summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into ↵Tarja Sundqvist2024-02-222-5/+10
|\ | | | | | | | | | | | | | | | | tqtc/lts-6.2-opensource Conflicts solved in a file: dependencies.yaml Change-Id: I500b721c4dd4f139c0dd26dab084505ec485c4a4
| * Update legend marker after setting label textSami Varanka2022-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When changing the text for legend marker it did not update the legenditem. Changed it to invalidate marker also instead of just the geometry. Fixes: QTBUG-107890 Change-Id: Ica0d431077f69df72ada456b3cfc7e8f91198b4c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 45a62936ab4467b0466eedb97a2a3f2234608f5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix QXYSeries's best fit line not showing in some coordinate rangesFriedemann Kleint2022-12-121-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the bottom left point of the domain as a starting point. Amends 28e2fb5a2891bcfb94cee288ec10909a1de29b10. Fixes: QTBUG-108090 Task-number: QTBUG-89453 Change-Id: I28e948373106fa4d00ed132a6dd11afb7ef2ea6f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> (cherry picked from commit 2672db21a846c071cb31cfcfb974db5d837cfc42) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-6.2.6' into ↵Tarja Sundqvist2023-03-011-1/+1
|\| | | | | | | | | | | tqtc/lts-6.2-opensource Change-Id: Ib45506323f2bb46e518a816591ae806cfec53dfa
| * Doc: Fix superfluous ;Kai Köhne2022-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes qxyseries.cpp:511: (qdoc) warning: Can't link to ';' Change-Id: Ica73f37068a826c862a8b6de3bbbd4682249fa7c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Lukas Kosinski (cherry picked from commit ee9011d8e370b5121d3e70a4495cee5ea855dda4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"Tarja Sundqvist2022-11-24397-4764/+4764
|/ | | | | | | | | | | This reverts commit ce7fdf434cf040849a69008be5f0f091204c9f2e. Revert of commercial license headers is required for the Qt 6.2.x opensource releases, Qt 6.2.5 onwards. Task-number: QTBUG-107760 Change-Id: I2107f31650eb46a3a8dd563a5269b6bdeb78c0ff Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix axis vanishing with specific valuesJere Tuliniemi2022-06-142-2/+2
| | | | | | | | | | | Charting values 1000000000000 and 1000000000001 with QValueAxis would not work since qFuzzyCompare fails with those values. Fixes: QTBUG-102392 Change-Id: I06dd9b1a86da97d7cc5a59c7fd3696a8165c6205 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 14688ccb30d28273c1d4f2c245e9fa07442151ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve performance on QXYModelMapperTomi Korpipaa2022-06-131-13/+14
| | | | | | | | | | | | | | Remove unused variable, which is populated by calls to QXYSeries points() in a loop. Additionally add variables for column() and row() to avoid repeated calls to those. Fixes: QTBUG-99190 Change-Id: I3659a571ff7ef57c3db693c599f35f15227201ea Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit bf1eae298e30822dbace46ae126f462368abe791) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix minor tick placement for horizontal axisJoni Poikelin2022-05-301-4/+4
| | | | | | | | Change-Id: Id7f87bc2cd087eb2f3e4da684386fca57115ae98 Fixes: QTBUG-101945 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 1c50218113d49f467a870054ea6813d61088d47a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2022-05-27397-4764/+4764
| | | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtcharts.. Examples, tests, or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the the line count causes failures in tests. Task-number: QTQAINFRA-4929 Change-Id: I52db4ff0f86002ff7a8421cff95337f9868fd9ba Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix QChartView rubberband zoomMiikka Heikkinen2022-04-081-10/+10
| | | | | | | | | | | | | Rubberband flag handling was changed from using equality operator to testFlag() when a new flag was added. This change broke the case where both horizontal and vertical flags were specified. Fixed the logic to account for all cases properly. Fixes: QTBUG-102286 Change-Id: Ib19cc3a2d7852097567fe36f04ff021232d49d3c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> (cherry picked from commit 9fd4d2f8a2a77990a78be929d0ff2be78f5720ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix deprecated uses of QScopedPointerMiikka Heikkinen2022-03-3113-32/+37
| | | | | | | | | | | By changing it to unique_ptr. Fixes: QTBUG-102140 Change-Id: I579a41e62832b026fd7ec682b91a42738030b675 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> (cherry picked from commit 24fa9b3b0ba97d065b1705c7698e623b4ddc72a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reset OpenGL state derived from the previous frameYuya Nishihara2022-02-151-0/+2
| | | | | | | | | | | | IIUC, there's no guarantee that the OpenGL context is "clean" state on QQuickWindow::beforeRendering(). And series color could get wrong if blend mode is unexpected, for example. Fixes: QTBUG-100810 Change-Id: Iae1eb9025c8740c5e63e10d9339a266ce8e5d338 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 61011ff6c134f536c6c29f97daf1b26b51d63639) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix old-style property revisions found in ValueAxis and BoxPlotSeriesYuya Nishihara2022-02-082-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise some properties would be missing with versioned import: import QtCharts 2.3 ChartView { ValueAxis { tickInterval: 10 } } Follows up 9caf31fb "Port charts to new property registration system." According to this commit, REVISION 1 of ValueAxis corresponds to 2.3, and BoxPlotSeries to 2.0. // QtCharts 2.3 qmlRegisterType<QValueAxis, 1>(uri, 2, 3, "ValueAxis"); qmlRegisterType<DeclarativeBoxPlotSeries, 1>(uri, 2, 0, "BoxPlotSeries"); QBoxPlotSeries::countChanged() had no Q_REVISION(), which might be a bug, but fixing that would break existing codebase if QtCharts < 2.0 were still supported. Change-Id: If340de5dc38bd12be09f804f1c5859b6f9667f28 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0874fea4768bce5321052ca0a5d0cdcf6ccdd55d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix mouse event handling regression for scatter chartsMiikka Heikkinen2021-12-131-1/+8
| | | | | | | | | | | | | | | | | The scatter chart item is the size of the entire chart, so all mouse events were being eaten by it even though light markers were not in use. Regular markers are separate items with separate mouse handling, so no mouse handling is required on scatter chart item in that case. Fixed by disabling hover event handling for non-marker case and ignoring non-marker mouse clicks. Fixes: QTBUG-99044 Change-Id: I7a6bedc87f773d916ff0c184d00e8236b51a2d92 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> (cherry picked from commit 2dc32ee0f315e9f30edfd248f00ac093163ee49a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix: QPieSlice docs don't mention HTML formattingSami Varanka2021-11-301-0/+2
| | | | | | | | | | | | | | Added a note to QPieSlice documentation to mention that the label string can be HTML formatted. Fixes: QTBUG-98282 Change-Id: Ia9bcd478e86d38228d9ff46053eedb13a0b876e1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 50eb5ad6a2854fc5d6acc45279d0bb3ee9b33411) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix axes not being removed when sharedHatem ElKharashy2021-10-151-0/+3
| | | | | | | | | | | | | Switching axes that is shared between multiple series causes them not to be removed. The axis must be detached from the series when removed so that it can be removed in the next iteration. Fixes: QTBUG-81278 Change-Id: Iba9e027333ed924ff985e36184f7e6d49d2124cf Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 968e128f3379514b476ed21dd92cf2ac8f9f861d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix incorrect plotArea before resizeTomi Korpipaa2021-10-154-7/+18
| | | | | | | | | | | | If plotArea is set inside ChartView, contentGeometry is updated too early and we end up with incorrect plotArea. Invalidate the layout to correct the geometry. Fixes: QTBUG-95870 Change-Id: I761125633bcbb8297e629b3e98d61e7d95975806 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit f78e11381f2dedcab4bda44e52b3c75d810766c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add spline-series exampleAndrii Staikov2021-09-243-0/+76
| | | | | | | | | | | | | | | Example shows using of points selection and adding light markers to plot. User can select shapes for markers and light markers and set images for them. [QtCharts][Example] Added Example Task-number: QTBUG-89445 Task-number: QTBUG-92884 Change-Id: Id0c9a5a7b696b7a51804575f645578d06c717d4e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 5070d1fc3ee4b63c8a04f1fdf9226b779a6cb167) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sure to install designer files with non-prefixed buildsAndy Nichols2021-09-043-3/+6
| | | | | | | | | | | | | | It is not enough to just call qt_copy_or_install with a DESTINATION value prefixed with only ${INSTALL_QMLDIR}/ because for non-prefixed builds this will install relative to the directory this cmake file is in. Instead we have to combine ${QT_INSTALL_DIR} with the target path to make sure the final path is always correct. This pattern is used all over, so we muse do it as well. Change-Id: I327765dd61224ff070b07a48abc424fd7dadbb37 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 76c3558507da722f7f523d36dc1cf61fdb376084) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Points selection for QSplineSeriesAndrii Staikov2021-08-301-8/+66
| | | | | | | | | | | | Points selection was implemented for QLineSeries and QScatterSeries, but not for QSplineSeries. Now points selection is supported for QSplineSeries not only by lightMarkers, but also using QXYSeries::setSelectedColor() and QXYSeries::setMarkerSize(). [qtcharts][splineseries] Task-number: QTBUG-89445 Change-Id: I26d2ed5a16afffa6b9cd813330a182156bf33cff Reviewed-by: Lukasz Kosinski <lukasz@scythe-studio.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit c5d328b578477cddf4e094628a9dcc3b0912fa04) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add bar chart exampleAndrii Staikov2021-08-302-0/+69
| | | | | | | | | | | | Example shows using setBarSelected(). Selecting bars changes their color and information of selected/unselected bars. [QtCharts][Example] Added Example Task-number: QTBUG-89445 Change-Id: Ic863e763d2cfa552629f42afd1232c1f77b95e95 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 72d69b22d8da004fcb27e1a549cdda3f52b9c4af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Drop \instantiates entryVenugopal Shivashankar2021-08-242-2/+0
| | | | | | | | | | | | | | Those C++ classes do not exist anymore. Fixes these qdoc warning: qt5/qtcharts/src/chartsqml2/declarativechart.cpp:80: (qdoc) warning: C++ class DeclarativeChart not found: \instantiates DeclarativeChart qt5/qtcharts/src/chartsqml2/declarativepolarchart.cpp:35: (qdoc) warning: C++ class DeclarativePolarChart not found: \instantiates DeclarativePolarChart Task-number: QTBUG-95860 Change-Id: Icfa42fe3d67496306a8e40096d7550da6f22e3d9 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 858d0e995f1cde3c96e73813488be406294ab0cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Fix X axis labels to not draw over each other"Dimitrios Apostolou2021-08-191-12/+4
| | | | | | | | | | | | | | | | This reverts commit 5b6e1042bd0aa4514df71209e7784b23490dbd1e. It is reverted because it caused QTBUG-94998 (missing labels at the edges of axis). This revert reintroduces QTBUG-79218 (axis labels drawing over each other). A followup patch will fix it differently. Fixes: QTBUG-94998 Task-number: QTBUG-79218 Change-Id: I0dbb7e0a345feb9986bcf5d1d3e24d8dbea2277b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 4b056cf30d5870f73ec467a963fcaaa6ec6fab46) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Display selected points regardless of QXYSeries::lightMarker()Lukas Kosinski2021-08-196-25/+119
| | | | | | | | | | | | | | | | | | Selected points needs to be displayed regardless of the visibility of other points. It was correctly implemented when not using light markers concept, but it didn't work correctly with QXYSeries::lightMarker() set to null image and valid QXYSeries::selectedLightMarker(). The fix was to change some of the conditions in linechartitem.cpp, splinechartitem.cpp and scatterchartitem.cpp. There was also a change added to scatterchartitem to use QXYSeries::pointsVisible() setting. Task-number: QTBUG-89445 Change-Id: I6010bbf6b6f670f6b0694a7612d22e353d320154 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 1ba0ef016e9fef13fe35235cac208d0a762b324e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix the qdoc warningsVenugopal Shivashankar2021-08-183-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | qt5/qtcharts/src/chartsqml2/declarativechart.cpp:80: (qdoc) warning: C++ class DeclarativeChart not found: \instantiates DeclarativeChart qt5/qtcharts/src/chartsqml2/declarativepolarchart.cpp:35: (qdoc) warning: C++ class DeclarativePolarChart not found: \instantiates DeclarativePolarChart qt5/qtcharts/src/charts/legend/qlegend.cpp:238: (qdoc) warning: Undocumented parameter 'attachedToChart' in QLegend::attachedToChartChanged() qt5/qtcharts/src/charts/barchart/qbarset.cpp:693: (qdoc) warning: Undocumented parameter 'color' in QBarSet::setSelectedColor() qt5/qtcharts/src/charts/xychart/qxyseries.cpp:1607: (qdoc) warning: Can't link to 'QXYSeries::selectedColor()' qt5/qtcharts/src/charts/xychart/qxyseries.cpp:1624: (qdoc) warning: Undocumented parameter 'size' in QXYSeries::setMarkerSize() qt5/qtcharts/src/charts/xychart/qxyseries.cpp:1585: (qdoc) warning: Can't link to 'QXYSeries::selectedColor()' Task-number: QTBUG-95860 Change-Id: Id91d07df2caaac6de5a19536abaa56bef9686ba5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 621d29d8f26f33c5e74c0bc839fa289019ec1825) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add module upgrade documentation pageMiikka Heikkinen2021-08-102-0/+58
| | | | | | | | Fixes: QTBUG-95307 Change-Id: Ifc5d59348d5f4c521e22a1aa7a30cef2f8dd57dd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 002bbb637c25fac1617f8cd635ceca0fda62264b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* LogValueAxis::labelFormat is a string, not a realAlbert Astals Cid2021-08-021-1/+1
| | | | | | | Change-Id: If00d0eb5c7ec10aba549393a235de5f6558e6a52 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit b084cc1c4917cd2eb22c5cabd569a8c71d755c67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix AxisTypeColor flag valueMiikka Heikkinen2021-06-291-1/+1
| | | | | | | | | | Other flag values are distinct bit values, so follow the logic on the new flag as well. Change-Id: I7442187b14465a0aa75e659ea1218284e0f48abb Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> (cherry picked from commit 338ff57186ee5223eb9f14856393505b44db0ae4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add a comment discouraging people from manually installing QML filesUlf Hermann2021-06-171-0/+4
| | | | | | | | | | | You should almost never do such a thing. Let's make sure no one cargo cults this code. Change-Id: Ice34272ab3e4e8a9bbe392c4aeda95c48baf829a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> (cherry picked from commit 4f9baa79079d990de7aefef04b308d555689a07d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove old configure-related filesJoerg Bornemann2021-06-172-155/+0
| | | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Task-number: QTBUG-89536 Change-Id: Ia9b0ed4dd8108d5a43cb5b6e878ac003d2d54f10 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2d8c57704aa4b95cdeabcb448ea02ddb65415c99) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qml designer files installationMiikka Heikkinen2021-06-144-205/+68
| | | | | | | | Change-Id: Ifba5203be0d10adec479c2a171d460f1675b5eca Fixes: QTBUG-94472 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 519afc2f78a882c5878890547832a4ddd9a6d0c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use correct return type for qmlpropertyPaul Wicking2021-06-141-1/+1
| | | | | | | | | Fixes: QTBUG-94469 Change-Id: Ice05acdcabdb5e54f3dcb60210171cea51e002eb Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> (cherry picked from commit 663942a05dcfe5f77495491f0f740f1ddc430569) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update Qt Charts legend example to illustrate interactivityKeith Kyzivat2021-06-083-14/+34
| | | | | | | | | Example cleaned up and organized, and interactive checkbox is added to allow user to see how an interactive legend works. Task-number: QTBUG-93477 Change-Id: I855283ad8fffd61b23cf021ab41530255abfbd47 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix revisioning of a newly added propertyMiikka Heikkinen2021-06-071-2/+2
| | | | | Change-Id: I01428961dcad76e23cb30d50eadaada1583cf881 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Use empty string instead of QString("")Kai Köhne2021-06-077-10/+10
| | | | | | | | | | | | | Fixes deprecation warnings like declarativebarseries.cpp(38): warning C4996: 'QString::QString': Use fromUtf8, QStringLiteral, or QLatin1String There is an API difference between a QString() and an empty string, (QString::isNull), but a good API shouldn't rely on this. Change-Id: I341b066758ce05a7578ebad8bb9c1df3f2ea5370 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Port to new CMake qml APIFabian Kosmale2021-06-053-156/+80
| | | | | Change-Id: I043af5dabef71aa08b19252b0ecee6663ca25a7d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Bound geometry to content on detachKeith Kyzivat2021-06-043-1/+44
| | | | | | | | | When detaching a legend, bound the geometry to the content, so the detached legend is of a reasonable size. Task-number: QTBUG-94089 Change-Id: Iecae338993b5476c6a631805be2eafb28ef95ac3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove inner detached legend borderKeith Kyzivat2021-06-041-12/+0
| | | | | | | | | Remove the inner border designating the legend area for resizing. It is superfluous. Task-number: QTBUG-93477 Change-Id: I165a1e8153255bda5815ad3b6c44925b5c557c8f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support for custom light markers for selected points added to QXYSeriesLukas Kosinski2021-06-047-15/+118
| | | | | | | | | | Light markers and normal points are rather not used together, so selectedLightMarker feature was added to QXYSeries to highlight selected points using custom QImage. Task-number: QTBUG-89445 Change-Id: I199a0fe21e486240c2674ec042307ecd64aa3a35 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Port charts to new property registration systemFabian Kosmale2021-06-0319-3667/+614
| | | | | | Change-Id: I3d24eb8e5c0fdb718971535c2d2126dcf67a660f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add colorBy method to QXYSeries and QColorAxisLukas Kosinski2021-06-0320-60/+1288
| | | | | | | | | | | | | | This feature adds the availability to pass list of values that will be used to colorize points using points configuration feature according to the gradient. Gradient can be either set when calling the colorBy method or can be taken from attached QColorAxis. QColorAxis displays color scale widget with ticks and range based on data passed as colorBy method's parameter. Task-number: QTBUG-89447 Change-Id: I611048fac0e787e0a1eeaf181c5d8e8a8354fac5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add optional labels truncation to QAbstractAxisLukas Kosinski2021-06-027-15/+140
| | | | | | | | | | | | | | | | | This is a feature that allows users to switch off labels truncation that is by default performed if there is too little space for the label. By default truncateLabels is true, so it doesn't change previous behavior. If user doesn't want to have truncated labels, he can switch them off explicitly. There is also a labelsTruncated method added that returns true if there is at least one truncated label and false otherwise. The reason for this is to be able to programmatically check if labels are truncated. Task-number: QTBUG-89444 Change-Id: I8ab18a8d0335ddf31baf443a2046fee89ce58b38 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add sizeBy method to QXYSeriesLukas Kosinski2021-06-022-0/+41
| | | | | | | | | | | | This feature adds the availability to pass list of values that will be used to change points's sizes using points configuration feature. Size of the particular point is calculated by mapping corresponding value to range built upon passed values. Then it's adjusted by provided minimum and maximum size. Task-number: QTBUG-89448 Change-Id: I3f2fe4464ace34f64b381cd61184c743814a2f10 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Rename ChartAxisElement::isEmpty to not collide with QGraphicsLayoutItemKeith Kyzivat2021-06-016-9/+9
| | | | | | | | | | | Rename ChartAxisElement::isEmpty so it no longer collides with QGraphicsLayoutItem::isEmpty, which was introduced in Qt 6.0. Task-number: QTBUG-92586 Change-Id: I14f062e7a0cb090d7da435edfa22d1c447cc1a13 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add move and resize to QLegendKeith Kyzivat2021-06-019-21/+629
| | | | | | | | | | | | | | | | | | | | | | | This feature adds the ability to move and resize the chart legend when it is not attached to the chart. It does not put a separate frame around the legend, but instead takes control of mouse messages when the mouse cursor is between the content area and the border of the legend. The user can drag the legend around when they click and drag the top edge of a detached legend. A visual rectangle is painted when the user positions the cursor at the top of a detached legend. This area identifies the region they can use to drag the legend around. If the mouse pointer is moved beyond the edge of the chart, it will attach to the edge that the mouse moved off of. The legend remains bound to the area of the chart, even if dragging would have moved an edge of the legend beyond the edge of the chart. An attached legend can be detached by double clicking it. Task-number: QTBUG-93477 Change-Id: I5adff45802ba326004f2ffebe27357c8f8b138d0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QBarSet: Support for bars selectionLukas Kosinski2021-06-016-12/+302
| | | | | | | | | | | This feature allows user to mark desired bars as selected. Selected bars can have other color than other bars. The changes were made in abstractbarchartitem and qbarset. The idea is to add more interactivity to bar charts. Task-number: QTBUG-89445 Change-Id: I7db178c5e85c1872be9f1d7117c1ecd9299edde7 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Problem with coloring unselected points in linechartitem.cpp fixedLukas Kosinski2021-06-011-0/+3
| | | | | | | | | | There was a problem occurring when user selected a point and all points after that point were also colored in the same way as normal points. It was fixed by saving and restoring QPainter when needed. Task-number: QTBUG-94025 Change-Id: I26aca0c93c8dd6e321ce66ec4f3dba9a688a6b2e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Chart item mouse click handling if chart rubber band enabledKeith Kyzivat2021-05-316-9/+30
| | | | | | | | | | | | | | | | | | | | | Pass left mouse clicks on to underlying Qt Chart items if those items accept left mouse clicks, in all cases. Previous to this change if QChartView's setRubberBand feature was enabled, left clicks were always handled by the QChartView to start showing the rubber band selection. With this change, if the mouse is over a QGraphicsItem in the scene that accepts Qt::LeftMouse button, then the click is passed on to the item. To make this work, some QGraphicsItems that are created in the chart needed to properly mark their acceptance of mouse buttons using QGraphicsItem::setAcceptedMouseButtons, as the default is to accept all mouse buttons. Task-number: QTBUG-94035 Change-Id: I4f2ec3823b10acbb5ef5195454ab5461d04b75da Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add QLegend::attachedToChartChanged signalKeith Kyzivat2021-05-282-2/+14
| | | | | | | | | This will allow users to hook into when the legend is attached or detached. Task-number: QTBUG-93981 Change-Id: I3a0258a6c4c82a1feb005ac2df95a11e6f96d509 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>