6

I'm currently using Chartist.js, But I can't change the default line colors of Chart.

Chartist.js

Sample Chart Image

For SIMPLE LINE CHART I've tried:

.ct-series-a .ct-line{
    background-color: blue;
}

But It brings no result. How to fix this?

S M Iftakhairul
  • 1,120
  • 2
  • 19
  • 42
  • This question has been answered here: http://stackoverflow.com/questions/35402143/using-chartist-js-how-do-you-change-the-color-of-the-stroke-for-a-donut-chart. You need to override the correct css classes (they are slightly longer than yours). – Nathaniel Flick Apr 16 '17 at 04:51

1 Answers1

8

Try this:

.ct-series-a .ct-line {
  /* Set the colour of this series line */
  stroke: red;
  /* Control the thikness of your lines */
  stroke-width: 5px;
  /* Create a dashed line with a pattern */
  stroke-dasharray: 10px 20px;
}

https://gionkunz.github.io/chartist-js/getting-started.html#customizing-the-default-css