Commit Graph

63 Commits

Author SHA1 Message Date
Niko Korkala 64d1cd7d1e Add support for printf style formatting for valueAxisLabels
Task-number: QTBUG-133359
Pick-to: 6.8
Change-Id: Ice8c69dbb98874617de126b945361b23bc4e1b97
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit 6090cb94f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-13 08:03:41 +00:00
Niko Korkala 88becb5ee1 Add unused signals to be emitted
barSetsChanged is now emitted when we append, remove, clear, take, insert or replace
countChanged is now emitted when we append, remove, clear or insert
X and Y axisChanged are now emitted when its setter function is called

Fixes: QTBUG-129425
Pick-to: 6.8
Change-Id: Id7b21592ec38441bec100963cece0ceca33ed5c1
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit 9a057632b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-01-07 13:32:27 +00:00
Jere Tuliniemi 43b0c8d83a Add zoom and pan properties to autotests
Fix initial values for zoomStyle and panStyle properties.

Task-number: QTBUG-122325
Change-Id: Idf92d29ee280d0e76aa8f1f411464d9dfc9e971c
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit b3c9fb1693)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-12 15:57:42 +00:00
Niko Korkala c00cc7c319 Fix valuesMultiplier not working in piegraph
Also added sliders for valuesMultiplier to qmlTestBed donut chart so it is possible to manually test this

Task-number: QTBUG-131117
Pick-to: 6.8
Change-Id: I2da2d22847203e93ac058ae1be80b1bc1ec03c34
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit d6d7fcb369)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-12 13:13:18 +00:00
Sami Varanka 637154d1c9 Add pointsAdded signal to XYSeries
Change XYSeries' list append to emit pointsAdded signal and use
list append in XYSeries' list append instead of individual append.

Task-number: QTBUG-122336
Change-Id: I32598b3250fc8300d03fe8f7e745acc6dd516adc
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit d49b448a5f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-12 11:22:06 +00:00
Niko Korkala 33c8eb221f Fix DateTimeAxis double signaling
Add signalspys to DateTimeAxis cpp test

Fixes: QTBUG-129381
Pick-to: 6.8
Change-Id: I6178fc3f7c5c0b8e752908bb2f372db6ecc09df7
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
2024-10-08 09:12:08 +03:00
Tomi Korpipaa c12733352f Fix autotest crash
Fixes: QTBUG-129138
Change-Id: I3bf60a4e742b9f2960eff4cc2ed42a51b7eab739
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-23 12:22:16 +03:00
Tomi Korpipaa b0255c4d66 Add feature support for 2D graphs
Fixes: QTBUG-121037
Change-Id: I9090a3dfc051c0e8aadd5c00a0cc086763c32269
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-20 12:29:49 +03:00
Niko Korkala c0ad2d77a3 Fix new barsets connection issue and double signaling
This aims to fix issue with new barsets not creating connection with handleSet
slots when replace function is used. Also fixes issue of double signal sent
when setvisibility function is used.

Fixes: QTBUG-128661
Fixes: QTBUG-128863
Pick-to: 6.8
Change-Id: I432349a70032bf4b373142e063a38c46b35688db
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-17 11:51:48 +03:00
Niko Korkala ecc46041bf Add signalspys to cpp2d auto tests
Task-number: QTBUG-124504
Pick-to: 6.8
Change-Id: I4dbd0cefac4a2212c87e1180d0bc8325e1ebf105
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
2024-09-17 09:32:59 +03:00
Kaj Grönholm 1a3cb29dbe Add support for axis alignment
Allow setting alignment property for axis and based on that, render the
axis on left/right/top/bottom.

Task-number: QTBUG-120503
Change-Id: Ieda65627ebed644c2a1ddd2c4ed611fb268a401c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-11 08:09:17 +03:00
Michał Łoś c353c949a7 Exclude qgaxis-datetime from building when no timezone
`timezone` feature might be unavailable on some platforms, which causes
tests to fail. Exclude them from building in such case.

Pick-to: 6.7 6.8
Task-number: QTBUG-115777
Change-Id: I3b31b70f249cb6ab21a6b749c331952dbf06edd7
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-08-06 06:47:25 +02:00
Kaj Grönholm 031fc9c83e API: Cleanup axis behavior
- Remove axis orientation property. It wasn't working correctly
  as a CONSTANT and doesn't seem relevant for the users.
- Remove axis alignment property. It doesn't work until
  QTBUG-120503 (and will probably not be CONSTANT then) so better
  to remove for now.
- Remove m_axis list as it isn't needed.

Task-number: QTBUG-120503
Pick-to: 6.8
Change-Id: Ida70a8fdb20b3e2369dd4ecd24e21f6e90b1bcf2
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-31 13:53:15 +03:00
Sami Varanka cc9d8a9165 Rename size to pieSize in pieseries
Pick-to: 6.8
Task-number: QTBUG-127509
Change-Id: I13cda1549e09a9e3ab279eefa2a52b8032e2d976
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-25 14:27:33 +03:00
Owais Akhtar 5da586931b Default QDateTimeAxis min/max getters to UTC
Another option would be to allow the user to signify the timezone in the
DateTimeAxis itself, but that could be looked at separately.

Task-number: QTBUG-127493
Pick-to: 6.8
Change-Id: I2364fbde6c360a0ea0d8da5778cdada5e8530d68
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-25 13:02:30 +03:00
Kaj Grönholm 233bb360e1 Remove axis from GraphsView when deleted
When axis gets deleted, remove it properly from then GraphsView.
Includes autotest to verify.

Task-number: QTBUG-127460
Pick-to: 6.8
Change-Id: I4ad6ee477dde6ac09e65bcab690783603a2de2be
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-07-24 11:23:14 +03:00
Kaj Grönholm d19b4d42da Unify autotest names
3D autotest are named tst_qg* and 2D autotests tst_qg*2d

Pick-to: 6.8
Change-Id: I442ed36884897bcaa6b09e765bb5516e5aefcf8c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-23 11:27:59 +03:00
Owais Akhtar b21fa39ad1 Fix AreaSeries not updating if upper/lower series in manipulated in QML
This issue also seems to appear for XYSeries in general which is also
fixed in this patch. Also fixed: AreaRenderer does not clear shape when
point is removed and size goes below 2.

Fixes: QTBUG-126875
Pick-to: 6.8
Change-Id: Ie50d114117518c1b769736e55412c61171c42ec7
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-16 08:10:14 +03:00
Sami Varanka f8f168dcfd Fix QBarSet::replace crash in tst_barmodelmapper
Pick-to: 6.8
Fixes: QTBUG-125907
Change-Id: I54c8ac749dc18e6e9b365268ba722df7c518170a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-06-17 14:53:43 +03:00
Dilek Akcay 0219e8a1f1 Change 'enabled' properties to visible in 2D
Task-number: QTBUG-125377
Change-Id: I373bf3f15a564adc98069fd1eeb8e7e407f071dc
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-06-07 13:42:36 +03:00
Sami Varanka ff2646b044 Fix build error in tst_abstractaxis
Pick-to: 6.8
Change-Id: I0d48fd282cc81041d3d65782e5727bdef98ddf0a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-06-03 10:29:47 +00:00
Kaj Grönholm 55b791d6f7 API: Unify grid and axis naming
Remove major/minor and instead use grid/subGrid in grid and
tick/subTick in axis.

Task-number: QTBUG-124679
Change-Id: I1dd3a54112ae2dab46854321e3be6a31cad7ff44
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-31 12:32:45 +03:00
Tomi Korpipaa 530d81e27b Comment out crashing autotest
Ticket created: QTBUG-125907

Change-Id: I441d7a9395bd779ffe52330160ae474f265cfa64
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-30 12:51:22 +03:00
Kaj Grönholm c57647506d API: Unify QML component API
Use delegate in the names of the QML component properties.

Task-number: QTBUG-125881
Change-Id: Iae80dec6b522196f59b2f9888bf7bfbe1df0a86f
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-29 17:07:04 +03:00
Kaj Grönholm 785eaad804 API: Fix property getter naming
Use is* with boolean getters, except with plurals there should not be
is* or are*.

Task-number: QTBUG-125376
Change-Id: Ibe1f252627c6da3fbb10b404f6d1acc157479b57
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-28 20:03:15 +03:00
Kaj Grönholm 21ab34ff8a Support theme borderWidth in AreaSeries
Default to -1, so borderWidth comes from the theme by default, similarly
to colors. Also improve the API documentation.

Task-number: QTBUG-125462
Change-Id: I801294f44ad56186500e111a76069589bafc0c63
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-28 20:03:12 +03:00
Kaj Grönholm 6feca2f3c5 API: Update series theming
- Remove GraphsTheme from QAbstractSeries.
- Add seriesColors and borderColors properties into QBarSeries.
  Other series behave differently so these aren't useful for them.
- Small fixes to theme update and documentation.
- Take the changes into use in everywhere.

Task-number: QTBUG-124889
Change-Id: I8f91bd6aa52356376fd2febcbe9ba88282ece006
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-20 22:59:15 +03:00
Kwanghyo Park 79b3a6a6ca Fix compile errors for ios build
There are some type conversion issues on ios build
to be fixed by this patch

Change-Id: Idce02b43f1689900ff773af2bff8779ee7410591
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-05-20 16:27:16 +03:00
Tomi Korpipaa fc95d79b59 Fix some autotest compilation warnings
Change-Id: I198ccd6774e07d229925bf00fcd94bb96921f2d4
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
2024-05-14 13:57:14 +03:00
Tomi Korpipaa a1f1a463d3 Fix test compilation
Change-Id: I17a3698c30f420d29aecfaa0be71e77bbecb8f7e
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: <owais.akhtar@qt.io>
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
2024-05-14 08:16:48 +03:00
Owais Akhtar 024e7d777a Unify invokeables in series
Add exposed QML methods between series if not shared.

Task-number: QTBUG-124828
Change-Id: If9fed5f94aaa38f0da42b887192c0fd8941a08ed
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-10 14:51:53 +03:00
Sami Varanka 09f0342e64 Add XYModelMapper
Task-number: QTBUG-125027
Change-Id: Ic0ea8bb216abe3dd5a5732958ab5dfe2fdc7e610
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-10 10:57:39 +03:00
Sami Varanka 9aa8d47557 Add PieModelMapper
Task-number: QTBUG-124545
Change-Id: Ia615a85725af1f2ace8c87d2d28bac7b6f8de4e4
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-10 08:59:44 +03:00
Sami Varanka b27395c532 Add BarModelMapper
Task-number: QTBUG-121631
Change-Id: I9d808d9ba9725f1e635c9beab3a92d94a4c6d166
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-08 10:01:42 +03:00
Owais Akhtar fb9dc5890c Autotest fails on tst_datetimeaxis
Since the dates on the axis are not clamped anymore, this test is incorrect. Any valid QDateTime should be acceptable now.

Task-number: QTBUG-125109
Change-Id: I2ec1b63c76a9731ded88b13f5fdbca74287c0435
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-08 09:27:13 +03:00
Kaj Grönholm 75f7a25abd Add support for custom axis labelComponent
Add labelComponent property into QAbstractAxis. This QML component
will be created into position of labels, allowing custom labels.

Task-number: QTBUG-124507
Change-Id: I9f8c77031535e9bee0d047df79b392afb7487b5d
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-05-07 18:41:15 +03:00
Owais Akhtar 688da7b80e Implementation for DateTimeAxis
Task-number: QTBUG-121633
Change-Id: Ief34227fa2c94c4d9ffae2a21e35c9a994c4a360
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-05-03 15:14:11 +03:00
Jere Tuliniemi dd9aaaee1e Move axis properties to GraphsView
Also moves orientation from BarSeries to GraphView although other
series don't yet support horizontal orientation.

Task-number: QTBUG-125007
Change-Id: Id8cd724d0f74cc61185e66ad884db110efd84293
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-05-03 10:02:46 +03:00
Jere Tuliniemi 9338e77df7 Separate selection and dragging
Add draggable property to XYSeries. Point doesn't have to be selected
now to be draggable.

Task-number: QTBUG-124516
Change-Id: Idddd3d9f42b39c42102fb4bbe530837fc809e67b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: <owais.akhtar@qt.io>
2024-04-30 09:49:21 +03:00
Kwanghyo Park c8be94138e Introduce integrated theme for graphs
Task-number: QTBUG-123223
Task-number: QTBUG-123461
Task-number: QTBUG-124837
Task-number: QTBUG-124836
Change-Id: Iaa5ab35a0707fc63329b07f10a203fc63e033f0d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-04-30 08:15:46 +03:00
Jere Tuliniemi 6dcaa7d5e3 Separate selection and marker behavior
Remove special selection markers and allow Line and SplineSeries
without markers to be selected.

In ScatterSeries, use QML Component based point marker system even if
the user has not set the pointMarker property by creating a temp QML
point marker.

Also remove separate markerSize property for XYSeries and update
used pointMarker if the property is changed by the user.

Task-number: QTBUG-122431
Change-Id: I2e77dd060dbc69acac572e8db3d51617bcefe70c
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-04-22 14:08:44 +03:00
Kaj Grönholm 899a7dc62b Add support for bar graph labels
Support showing bars values with the existing API. Also add a new
property "labelsMargin" to control how much margin there is
between the labels and bars sides.

Task-number: QTBUG-121692
Change-Id: I60dec5bad48a5b9948e1a93de475824a415186ad
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: <owais.akhtar@qt.io>
2024-04-17 09:17:20 +03:00
Kaj Grönholm 4aafeba300 Make sure borderWidth is always positive
Fixes: QTBUG-121801
Change-Id: Ia16fe0325d910acc96926d9768f9cd0f0df40622
Reviewed-by: <owais.akhtar@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-04-04 16:36:09 +03:00
Kaj Grönholm 867d1c9898 Change all enums to scoped
Change all enums to scoped ones and:
- Rename enums to not contain type in the beginning.
- AxisType can be normal enum (not flags) and AxisTypeNoAxis is
  not needed.
- Fix BarThemes example initial color & font reset.

Fixes: QTBUG-123794
Change-Id: I8d7305dc7c09d0d6ac09b88cfc6f7297035e0207
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-04-04 10:40:21 +03:00
Kaj Grönholm dbcbd3d9c6 Remove QAbstractBarSeries
Remove abstract QAbstractBarSeries class and move all implementation
into QBarSeries.

Fixes: QTBUG-123754
Change-Id: Ic8b6cbae3aca53c87ce03f9715513fca826ad21c
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-03-27 17:21:18 +02:00
Lucie Gérard cdbb572098 Correct license for build system files
According to QUIP-18 [1], all build system
files should be BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: Ie1b4144b758f37c4c95b23d24818f59373ef5464
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-15 14:38:24 +01:00
Kwanghyo Park 5ac769fcee Add auto test cases for pie chart
Task-number: QTBUG-121776
Change-Id: I402f77a6b1e23519f2b70cda175023a6fd0183a3
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
2024-03-14 15:19:28 +02:00
Jere Tuliniemi 7c851128ee Add AreaSeries
Task-number: QTBUG-121624
Change-Id: Ie04e6452565fe83ee3ec2e0920ddfd196455880a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-03-12 10:28:52 +02:00
Owais Akhtar c868a26292 Create autotests for all added spline features
Task-number: QTBUG-121911
Change-Id: I32cfc91511c15dfa0b343e9ac52594957167a83f
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
2024-02-22 15:01:14 +02:00
Jere Tuliniemi 89ac7b7ded Fix autotests after theming changes
Task-number: QTBUG-122433
Change-Id: If3421a55248d167f3f01b3c6d3a2f75a824f16e6
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
2024-02-21 14:37:36 +02:00