NVD3 noData文本颜色更改 [英] NVD3 noData text color change

查看:219
本文介绍了NVD3 noData文本颜色更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用nvd3折线图和自定义noData的文本。现在我需要更新文本的颜色,并希望文本下划线。我更新了css与下面的更改。

I am using nvd3 line chart and customize the text of noData. Now i need to update the color of the text and want text underline. I have updated the css with below changes.

text.nvd3.nv-noData{
    color:"yellow";
    text-decoration: underline;
}

然而,文本装饰完美,但颜色不会改变。

however, text-decoration works perfectly but color is not getting change.

我更改了svg文本的填充值,但它会更改所有文本的文本颜色,包括轴标签值。

I have changed fill value of svg text but it will change the text color of all the text including axis lable values.

有人可以帮我解决这个问题吗?

Can someone pls help me with this ?

推荐答案

使用填充而不是引用: color yellow

text.nvd3.nv-noData{
  fill: yellow;
  text-decoration: underline;
}

这篇关于NVD3 noData文本颜色更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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