-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
split radial scale lineArc setting into two settings #3782
Conversation
@@ -310,14 +310,15 @@ The following additional configuration options are provided by the radial linear | |||
|
|||
Name | Type | Default | Description | |||
--- | --- | --- | --- | |||
lineArc | Boolean | false | If true, circular arcs are used else straight lines are used. The former is used by the polar area chart and the latter by the radar chart | |||
labelPoints | Boolean | true | If true, angle lines and point labels are drawn. |
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.
Is it something equivalent to pointLabels.display && angleLines.display
. If so, maybe it would be better to split this option in these two *.display
for a finer control. Else, I don't think the option name is great because then this scale will have very similar option names: labelPoints
and pointLabels
, which is confusing.
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.
Yeah, it's sort of like those. I'll update the code to use those two display settings instead
Made the changes suggested above. For now, I just use |
angleLines | Object | - | See the Angle Line Options section below for details. | ||
pointLabels | Object | - | See the Point Label Options section below for details. | ||
ticks | Object | - | See the Ticks table below for options. | ||
|
||
#### Angle Line Options | ||
|
||
The following options are used to configure angled lines that radiate from the center of the chart to the point labels. They can be found in the `angleLines` sub options. Note that these options only apply if `lineArc` is false. | ||
The following options are used to configure angled lines that radiate from the center of the chart to the point labels. They can be found in the `angleLines` sub options. Note that these options only apply if `labelPoints` is true. |
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.
labelPoints
doesn't exist anymore!
@@ -327,7 +327,7 @@ lineWidth | Number | 1 | Width of angled lines | |||
|
|||
#### Point Label Options | |||
|
|||
The following options are used to configure the point labels that are shown on the perimeter of the scale. They can be found in the `pointLabels` sub options. Note that these options only apply if `lineArc` is false. | |||
The following options are used to configure the point labels that are shown on the perimeter of the scale. They can be found in the `pointLabels` sub options. Note that these options only apply if `labelPoints` is true. |
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.
labelPoints
doesn't exist anymore!
User should be able to choose to display lines without labels and vice-versa, so Else, if displaying labels depends on displaying lines, |
Agreed, I will add the |
… new settings. gridLines.circular is a new option that toggles circular lines. This allows radar charts with circular lines #3082 pointLabels.display is a new option that toggles the display of point labels. The existing angleLines.display is used with the new pointLabels.display setting is used to trigger the radar like settings. This required changing the default polar area config.
Added the |
@simonbrunel when you get a chance, can you review again? |
Looks good, I would also add support for |
labelPoints
controls the visibility of angle lines and point labelsgridLines.circular
toggles how the radial lines are drawn. When false, straight lines are drawn. When true, circular lines are drawn.Allows creating charts that look like:
Resolves #3082
API Change
This is technically a breaking API change since the old setting,
lineArc
is no longer used. I don't know if this will cause problems since I think this setting is only used internally and it is not well documented.