-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axis refactor v12 - Separate AxisChannel properties from Channel properties #613
base: main
Are you sure you want to change the base?
Changes from all commits
1eb6d02
3514412
13d675b
23d4acf
ac76d52
c4173b0
d3ce44d
03938b8
3145013
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,12 @@ definitions: | |
oneOf: | ||
- type: number | ||
- { type: string, enum: [auto] } | ||
|
||
AxisChannel: | ||
description: | | ||
AxisChannels are special channel settings for the positional channels. | ||
type: object | ||
properties: | ||
axis: | ||
description: Enables the axis line on axis channels. | ||
$ref: AutoBool | ||
|
@@ -109,14 +115,18 @@ definitions: | |
type: object | ||
properties: | ||
x: | ||
$ref: Channel | ||
allOf: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need for |
||
- $ref: Channel | ||
- $ref: AxisChannel | ||
description: | | ||
Parameters for the X-axis, determining the position of the markers on the | ||
x-axis - or their angle when using polar coordinates. | ||
Note: leaving x and y channels empty will result in a | ||
chart "without coordinates" like a Treemap or a Bubble Chart. | ||
y: | ||
$ref: Channel | ||
allOf: | ||
- $ref: Channel | ||
- $ref: AxisChannel | ||
description: | | ||
Parameters for the Y-axis, determining the position of the markers on the | ||
y-axis - or their radius when using polar coordinates) . | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ namespace Vizzu::Gen | |
struct Channels : Refl::EnumArray<ChannelId, Channel> | ||
{ | ||
using IndexSet = std::set<Data::SeriesIndex>; | ||
EnumArray<AxisId, AxisChannelProperties> axisProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't something like this would be more straight forward:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Later I'll fix that. |
||
|
||
[[nodiscard]] bool anyAxisSet() const; | ||
[[nodiscard]] bool isEmpty() const; | ||
|
@@ -37,6 +38,17 @@ struct Channels : Refl::EnumArray<ChannelId, Channel> | |
return at(+id); | ||
} | ||
|
||
[[nodiscard]] const AxisChannelProperties &axisPropsAt( | ||
const AxisId &id) const | ||
{ | ||
return axisProps[id]; | ||
} | ||
|
||
[[nodiscard]] AxisChannelProperties &axisPropsAt(const AxisId &id) | ||
{ | ||
return axisProps[id]; | ||
} | ||
|
||
void removeSeries(const Data::SeriesIndex &index); | ||
|
||
[[nodiscard]] bool isSeriesUsed( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Channel props can be inherited: