Skip to content

Commit c15c638

Browse files
committed
split -> spacing
1 parent e0a208c commit c15c638

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
### Added
3535

36-
- Add split property for plot axis style structure. Only supported the percentage value.
36+
- Add spacing property for plot axis style structure.
3737

3838
## [0.15.0] - 2024-10-28
3939

src/apps/weblib/typeschema-api/styles.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,9 @@ definitions:
452452
interlacing:
453453
$ref: Interlacing
454454
nullable: true
455-
split:
456-
$ref: Length
455+
spacing:
456+
type: string,
457+
mask: /:number:%/
457458
nullable: true
458459

459460
Plot:

src/chart/generator/plotbuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ void PlotBuilder::addSeparation(const Buckets &subBuckets,
530530
auto splitSpace =
531531
plot->getStyle()
532532
.plot.getAxis(plot->getOptions()->subAxisType())
533-
.split->get(max.getMax(),
533+
.spacing->get(max.getMax(),
534534
plot->getStyle().calculatedSize());
535535

536536
for (auto i = 1U; i < ranges.size(); ++i)

src/chart/main/style.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Chart Chart::def()
280280
.interlacing = {
281281
.color = Gfx::Color::Gray(0.97)
282282
},
283-
.split = Gfx::Length::Relative(1 / 15.)
283+
.spacing = Gfx::Length::Relative(1 / 15.)
284284
},
285285
.yAxis = {
286286
.color = Gfx::Color::Gray(0.8),
@@ -372,7 +372,7 @@ Chart Chart::def()
372372
.interlacing = {
373373
.color = Gfx::Color::Gray(0.97)
374374
},
375-
.split = Gfx::Length::Relative(1 / 15.)
375+
.spacing = Gfx::Length::Relative(1 / 15.)
376376
},
377377
.areaColor = Gfx::Color::Transparent(),
378378
.overflow = ::Anim::Interpolated<Overflow>(Overflow::hidden)

src/chart/main/style.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ struct Axis
245245
Tick ticks;
246246
Guide guides;
247247
Interlacing interlacing;
248-
Param<Gfx::Length> split;
248+
Param<Gfx::Length> spacing;
249249
};
250250

251251
struct MarkerLabelParams

test/e2e/tests/style_tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
"plot/paddingTop/static_350": {
356356
"refs": ["bcfbd92"]
357357
},
358-
"plot/split": {
358+
"plot/spacing": {
359359
"refs": ["d21c2a7"]
360360
},
361361
"plot/xAxis/color/hexa/animated_yellowCustom_0.25-blueCustom_0.75": {

test/e2e/tests/style_tests/plot/split.mjs renamed to test/e2e/tests/style_tests/plot/spacing.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const testSteps = [
2424
style: {
2525
plot: {
2626
yAxis: {
27-
split: '15%'
27+
spacing: '15%'
2828
}
2929
}
3030
}

0 commit comments

Comments
 (0)