How to change line colors of chart in Chartist.js

穿精又带淫゛_ 提交于 2020-01-14 03:20:16

问题


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

Chartist.js

For SIMPLE LINE CHART I've tried:

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

But It brings no result. How to fix this?


回答1:


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



来源:https://stackoverflow.com/questions/43432120/how-to-change-line-colors-of-chart-in-chartist-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!