css 柱型状表,CSS 控制样式的柱形图 | JShare

  • Post author:
  • Post category:其他


CSS 控制样式的柱形图 | JShare

Highcharts.chart(‘container’, {

chart: {

type: ‘column’,

styledMode: true

},

title: {

text: ‘Styling axes and columns’

},

yAxis: [{

className: ‘highcharts-color-0’,

title: {

text: ‘Primary axis’

}

}, {

className: ‘highcharts-color-1’,

opposite: true,

title: {

text: ‘Secondary axis’

}

}],

plotOptions: {

column: {

borderRadius: 5

}

},

series: [{

data: [1, 3, 2, 4]

}, {

data: [324, 124, 547, 221],

yAxis: 1

}]

});

#container {

height: 400px;

max-width: 800px;

margin: 0 auto;

}

/* Link the series colors to axis colors */

.highcharts-color-0 {

fill: #7cb5ec;

stroke: #7cb5ec;

}

.highcharts-axis.highcharts-color-0 .highcharts-axis-line {

stroke: #7cb5ec;

}

.highcharts-axis.highcharts-color-0 text {

fill: #7cb5ec;

}

.highcharts-color-1 {

fill: #90ed7d;

stroke: #90ed7d;

}

.highcharts-axis.highcharts-color-1 .highcharts-axis-line {

stroke: #90ed7d;

}

.highcharts-axis.highcharts-color-1 text {

fill: #90ed7d;

}

.highcharts-yaxis .highcharts-axis-line {

stroke-width: 2px;

}

{“resource”:”3,7,63,https://img.hcharts.cn/highcharts/css/highcharts.css”,”options”:”{\”editor\”:{\”saveLayout\”:false,\”saveFold\”:false,\”autoFormat\”:true},\”hcode\”:{\”layoutId\”:\”2\”}}”,”code”:{“code”:”pHODmr”,”name”:”CSS 控制样式的柱形图”,”version”:0,”doctype”:0,”description”:””,”meta”:””,”newGroup”:8,”group”:{“id”:8,”name”:”demos”,”code”:”demos”}}}