如何在Chartist.js中更改图表的线条颜色 [英] How to change line colors of chart in Chartist.js

查看:218
本文介绍了如何在Chartist.js中更改图表的线条颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Chartist.js

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

Chartist.js

对于SIMPLE LINE CHART我已经尝试过:

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

但是没有结果.该如何解决?

But It brings no result. How to fix 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

这篇关于如何在Chartist.js中更改图表的线条颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆