5

我目前正在使用Chartist.js,但无法更改 Chart 的默认线条颜色。

Chartist.js

示例图表图像

因为SIMPLE LINE CHART我试过:

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

但它没有带来任何结果。如何解决这个问题?

4

1 回答 1

6

尝试这个:

.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

于 2017-11-30T19:04:55.600 回答