Skip to content

Commit

Permalink
Fix measure guides + add tc + add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
schaumb committed Nov 23, 2024
1 parent 5630045 commit 46f1cb3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
- Fix chaotic axis labels on sorted chart with multiple dimension.
- Fix Mekko charts: The main axis handled as dimension.
- LabelLevel can be used to handle measure axis as dimension axis.
- Enable dimension axis ticks and interlacing.
- Enable measure axis guides.
- Fix dimension axis guides on sorted chart.

## [0.15.0] - 2024-10-28

Expand Down
4 changes: 1 addition & 3 deletions src/chart/rendering/drawguides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ void DrawGuides::draw(Gen::AxisId axisId)

auto baseColor = *guideStyle.color;

if (const auto &axis = parent.getAxis(axisId).dimension;
!baseColor.isTransparent() && !axis.empty()
&& *guideStyle.lineWidth > 0
if (!baseColor.isTransparent() && *guideStyle.lineWidth > 0
&& parent.plot->guides.at(axisId).axisGuides != false) {
parent.canvas.setLineWidth(*guideStyle.lineWidth);

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"refs": ["ba17dad"]
},
"events/drawing_events": {
"refs": ["f3e3115"]
"refs": ["962d7d3"]
},
"subtitle_caption": {
"refs": ["f6dabf0"]
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/features/events/drawing_events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function setupEvents(chart) {
})
})
chart.on('draw-complete', (e) => {
const references = [-243018988]
const references = [-1089061267, -1601698349]
receivedEvents.push(e)
const result = JSON.stringify(receivedEvents, null, 2)
const hash = (str) =>
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/tests/fixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"163": {
"refs": ["a82431f"]
},
"174": {
"refs": ["39e5361"]
},
"250": {
"refs": ["e140a3d"]
},
Expand Down
22 changes: 22 additions & 0 deletions test/e2e/tests/fixes/174.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const testSteps = [
(chart) => {
const data = {
series: [
{ name: 'Foo', values: ['Alice', 'Bob', 'Ted'] },
{ name: 'Bar', values: [15, 32, 12] },
{ name: 'Baz', values: [5, 3, 2] }
]
}

return chart.animate({ data })
},
(chart) =>
chart.animate({
x: { set: 'Foo', title: 'Valami', ticks: true, guides: true },
y: { set: 'Bar', title: 'Valami', ticks: true, guides: true, interlacing: false },
geometry: 'circle',
sort: 'byValue'
})
]

export default testSteps

0 comments on commit 46f1cb3

Please sign in to comment.