基于echarts 的图表控件的柱状图部分。api参考网址:https://www.echartsjs.com/zh/index.html
包括折线、柱状图(竖直)、bar图(水平图)等形式。
工具位置

画面效果

必需方法
- js对象名称:pkchartbar
- setSeriesData:function(objectname,seriesData)。填充序列数据,必须调用。seriesData为数组,每个数组元素又是一个数组
- 如果x轴的type==category,则每个序列数据是一个数组,
- 示例:pkchartbar.setSeriesData("bar1", [[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]]);

- 如果x轴的type==time,则每个序列数据数组的元素是时间+数值。
- 示例:pkchartbar.setSeriesData("bar1",[[[1522306819000, 2], [1522306919000, 1], [1522307019000, 3], [1522307119000, 1], [1522307120000, 1],[1522307230000, 1], [1522302230000, 1], [1522307430000, 1], [1522407230000, 1]]]);

- 完整示例2--标题和图例、X轴分类:
- pkchartbar.setSeriesData("bar1", [[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]]);
- pkchartbar.setSeriesInfo("bar1",[{name: '用水量',type:"bar"}]);
- pkchartbar.setLegendShow("bar1",1)
- pkchartbar.setTitle("bar1","用水量");
- pkchartbar.setXAxis("bar1",[{data:['周一', '周二', '周三', '周四', '周五', '周六', '周日']}]);

- 完整示例3--渐变效果:
- pkchartbar.setSeriesData("bar1", [[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]]);
- pkchartbar.setSeriesInfo("bar1",[{name: '用水量',type:"bar",itemStyle:{color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{offset: 0, color: '#83bff6'},{offset: 0.5, color: '#188df0'},{offset: 1, color: '#188df0'}])}}]);

- 完整示例3--柱状图和折线图混合:
- pkchartbar.setSeriesData("bar1", [[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3][2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3][2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]]);
- pkchartbar.setSeriesInfo("bar1",[{name: '蒸发量',type:"bar"},{name: '降水量',type:"bar"},{name: '平均温度',type:"line"}]);
专有事件
- onChange事件。当鼠标点击某个柱子时,触发onChange事件。参数:objectname,value。其中value包括:value,name等

专有动画关联
专有属性配置对话框