Commit 4f1a0b1
authored
feat(axis): improved axis styles (#711)
Axis improvements
- Hide axis but show gridlines
- hide axis titles, labels, ticks and line independently
- add inner and outer padding to tick labels
- add inner and outer padding to axes titles
- transform offsets relative to local reference (i.e. rotated coordinates)
- transform offsets relative to global reference
- add tick label horizontal and vertical alignment
closes #714, #312
BREAKING CHANGES
property name changes:
AxisSpec.gridLineStyle => AxisSpec.gridLine
AxisSpec.gridLineStyle => AxisSpec.gridLine
type changes:
AxisSpec.tickLabelRotation => AxisStyle.tickLabel.rotation
AxisSpec.tickPadding => AxisStyle.tickLine.padding
AxisSpec.tickSize => AxisStyle.tickLine.size
AxisStyle.tickLabelPadding => AxisStyle.tickLabel.padding
GridLineConfig => GridLineStyle
AxisSpec.style => RecursivePartial<AxisStyle> (new AxisStyle type)
AxisConfig.axisLineStyle => AxisStyle.axisLine
AxisConfig.axisTitleStyle => AxisStyle.axisTitle
AxisConfig.tickLabelStyle => AxisStyle.tickLabel
AxisConfig.tickLineStyle => AxisStyle.tickLine
GridLineStyle requires all properties
deprecate AxisSpec.showGridLines in favor of AxisSpec.gridLine.visible1 parent ce4349f commit 4f1a0b1
338 files changed
Lines changed: 1277 additions & 597 deletions
File tree
- api
- integration
- tests/__image_snapshots__
- src
- chart_types/xy_chart
- annotations
- legend
- renderer/canvas
- axes
- primitives
- specs
- state
- selectors
- tooltip
- utils
- mocks/specs
- specs
- utils
- themes
- stories
- axes
- grids
- legend
- stylings
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
0 commit comments