Line Chart: lineDashStyle
- This topic has 2 replies, 2 voices, and was last updated 10 years, 5 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › SPJS Charts for SharePoint › Line Chart: lineDashStyle
I have a line chart with a 4 lines/series and I’d like to have two of those lines appear dashed, and the other two appear solid. By default, all lines are solid.
If I use the “lineDashStyle” option, it will obviously make all 4 lines dashed. I therefore assume the “series” option is the way to go, with the “lineDashStyle” option embedded within.
Here’s how I set it up…
Option: series
variable text:
{
1: { lineDashStyle: [1, 1] },
3: { lineDashStyle: [2, 2] }
}
Unfortunately, all of the lines are sticking to their default solid format.
Anyone able to provide insight here?
Hi,
Unfortunately the examples in Google’s examples does not have the correct JSON string syntax – use this format and you should get your dotted lines:
Option name: “series”, option value:
{
"0": {
"lineDashStyle": [
1,
1
]
},
"1": {
"lineDashStyle": [
2,
2
]
},
"2": {
"lineDashStyle": [
3,
3
]
}
}
Alexander
Good catch, that fixed it. Thank you sir.