Skip to content

How to style lines in line chart? #335

Answered by criscola
criscola asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, found it:

<Chart
  options={{
    data: graphData,
    primaryAxis,
    secondaryAxes,
    getSeriesStyle: series => {
      if (shouldLineBeDotted(series.label)) {
        return {strokeDasharray:"5,5"};
      }
      return {};
    }
    // defaultColors: ["#ff0000", "#00ffff", "#ff00ff", "#ff0000", "#00ffff", "#ff00ff"], // TODO: How to color code?
  }}
/>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by criscola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant