Highcharts基本配置说明
2013-06-09 09:20
295 查看
var chart1 = new Highcharts.Chart({ chart: { renderTo: 'container', defaultSeriesType: 'line', marginLeft: 83, marginTop: 45, marginRight: 44, marginBottom: 60, zoomType: 'xy' }, credits: { enabled: false }, exporting: { enabled: true }, title: { text: $("#bbmc").val(), x: -20 //center }, subtitle: { text: '', x: -20 }, plotOptions: { series: { lineWidth: 0.5, //过程线的宽度 marker: { radius: 1 //过程线上点的宽度 } } }, xAxis: { title: { text: '水位(m)', //显示X轴名称 align: "high", style: { color: '#000000', //显示Y轴名称文字颜色 font: 'bold 14px "STSong"' } }, labels: { step: $("#step").val(),//控制x轴显示label的间距 title: { enabled: false, text: 'X-values', align: 'middle', // low, middle or high margin: 35, style: { color: '#6D869F' } } }, categories: ss }, yAxis: [{ // Primary yAxis //显示Y轴名称 title: { text: '库容(' + $("#dw").val() + ')', //显示Y轴名称 style: { color: '#000000', //显示Y轴名称文字颜色 font: 'bold 14px "STSong"' } } }, { // Primary yAxis //显示Y轴名称 title: { text: '面积(km²)', //显示Y轴名称 style: { color: '#000000', //显示Y轴名称文字颜色 font: 'bold 14px "STSong"' } }, opposite: true //控制标签是否显示到上面标签的对面 }], tooltip: { formatter: function () { var s = '<b>水位:</b>' + this.x + '<b>m</b>'; $.each(this.points, function (i, point) { s += '<br/>' + '<b>' + point.series.name + ': ' + '</b>' + point.y + '<b>' + (point.series.name == '库容' ? $("#dw").val() : (point.series.name == '面积' ? ' km²' : ' m')) + '</b>'; }); return s; }, crosshairs: true, borderColor: '#4572A7', shared: true }, legend: { layout: 'horizontal', //控制图例内容显示的方向:此处为水平显示,值可以为:horizontal、vertical align: 'left', //控制图例水平显示的位置,此处为左边,值可以为:left、right verticalAlign: 'bottom', //控制图例垂直显示的位置,此处为底部,值可以为:bottom、top x: 70 }, lang: { exportButtonTitle: '导出图片', printButtonTitle: '打印', resetZoom: '100', downloadPNG: '导出PNG图片', downloadJPEG: '导出JPEG图片', downloadPDF: '导出PDF', downloadSVG: '导出SVG' }, series: [{ name: '库容', //color: '#4572A7', type: 'spline', data: charts }, { name: '面积', type: 'spline', data: wsfas }], plotLines: [{ value: 0, width: 1, color: '#808080' }] });
相关文章推荐
- highcharts图表高级入门之polar:极地图的基本配置以及一些关键配置说明(转载)
- highcharts图表高级入门之polar:极地图的基本配置以及一些关键配置说明
- 为Win7/Win8.1用户解惑:Win10正式版基本系统配置要求及重要说明
- nginx基本配置和参数说明
- Highcharts选项配置详细说明文档
- Highcharts,一款非常強大的JS圖表控件,参数配置说明
- sersync2 完全安装配置说明(三) ----插件基本配置和使用
- log4j配置文件基本含义说明
- log4j配置文件基本含义说明
- nginx基本配置与参数说明
- Jquery Highcharts 选项配置 说明文档
- nginx基本配置与参数说明
- nginx基本配置与参数说明
- Highcharts属性配置详细说明文档
- testng.xml说明文档(TestNG基本模板、TestNG中配置按顺序执行Case、TestNG中配置组合测试)
- Highcharts选项配置详细说明文档
- nginx基本配置与参数说明
- nginx基本配置与参数说明
- elasticsearch.yml基本配置说明