12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import ChartBar from '../../../src/chart/line/ChartLine21/ChartLine21.js';
-
- let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
- window.addEventListener('resize', () => {
- bar.resize();
- });
-
-
- const obj = {
- color: ['#1fcfff', '#00f7fe', '#006dff', '#fe6cfd', '#ffdc00', '#fcfefd'],
- bg: {
- backgroundColor: "#000000",
- showBgPlane: true,
- bgPlaneColor: '#ffffff',
- borderColor: '#0000ff'
- },
- legend: {
- show: true,
- left: "70%",
- top: '5%',
- orient: 'horizontal',
- itemWidth: 8,
- itemHeight: 8,
- borderRadius: 0,
- textStyle: {
- fontSize: 14,
- color: "#ffffff"
- }
- },
- grid: {
- left: "0%",
- right: "-50%",
- top: "0%",
- bottom: "0%",
- // show: true
- },
- yAxis: {
- type: "value",
- splitNumber: 5,
- textStyle: {
- fontSize: 12,
- color: "#ffffff",
- shadowBlur: 0,
- shadowColor: "#ffffff"
- }
- },
- xAxis: {
- type: "category",
- textStyle: {
- fontSize: 20,
- color: "#ffffff",
- shadowBlur: 0,
- shadowColor: "#ffffff"
- },
- data: [0, 10, 20, 30, 40, 50],
- },
- toolTip: {
- lineColor: '#ffffff',
- sign: {
- centerColor: 'red',
- size: 31
- },
- font: {
- fontSize: 122,
- fontColor: '#fff'
- }
- },
- shape: {
- lineColor: '#02daf1',
- planeColor: 'red',
- axisColor: 'red'
- },
-
- series: [{
- name: '净价',
- data: [10, 8, 9.3, 11.5, 13.2, 10.7]
- }, {
- name: '全价',
- data: [12, 11, 8.4, 14.3, 16.6, 16]
- }, {
- name: '总收益',
- data: [20, 24, 21.4, 25, 23, 31]
- }, {
- name: '中债到期收益率',
- data: [8, 31, 25, 26.7, 31, 32.5]
- }, {
- name: '中债综合指数',
- data: [26, 28, 25, 20.4, 23.6, 25]
- }, {
- name: '中债全价总指数',
- data: [17, 19, 21.3, 24, 20, 21]
- }]
- }
-
- setTimeout(()=>{
- // bar.setOption(obj)
- }, 3000)
|