鍍金池/ 問(wèn)答/HTML/ Echarts 主標(biāo)題文字顏色與設(shè)置值有差異?

Echarts 主標(biāo)題文字顏色與設(shè)置值有差異?

問(wèn)題如題,這是我的package.json

{
  "name": "react-demo",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "antd": "2.12.0",
    "jquery": "^3.2.1",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "react-native-listener": "^1.0.2",
    "react-router": "^4.1.1",
    "react-router-dom": "^4.1.1",
    "react-scripts": "1.0.10"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "echarts": "^3.6.2"
  },
  "optionalDependencies": {}
}

這是我的echarts部分代碼:

//const result 一些數(shù)據(jù)~
let ClientChart = echarts.init(document.getElementById("clientChart"));

ClientChart.setOption({
    title: {
        text: '客戶(hù)端',
        textStyle: {
            color: '#333',
            fontSize: 16,
        },
        left: '40px',
        top: '20px',
        x: 'center'
    },
    tooltip: {},
    legend: {
        data: ['NFS數(shù)量', 'CIFS數(shù)量'],
        left: 'left',
    },
    color: ["rgb(97,160,168)", "rgb(212,130,101)"],
    series: [{
        name: '客戶(hù)端',
        type: 'pie',
        radius: ['0', '70%'],
        data: [
            {name: ['NFS數(shù)量'], value: [result.nfs_num]},
            {name: ['CIFS數(shù)量'], value: [result.cifs_num]}
        ]
    }]
});

render(){
    return (
        <Row>
            <Col span={12}>
                <div id="clientChart"></div>
            </COl>
        </Row> 
    )
}

他的效果是這樣的:

clipboard.png

顏色差異很大,這是為什么呢?

回答
編輯回答
北城荒

應(yīng)該不是Echarts的問(wèn)題,可能是被一層透明DIV覆蓋了

2017年5月1日 06:34