部门大哥前天叫我做项目-----报表;表示压力大大,三个月没有打过代码的人,你让我写项目,这不是搞笑吗?
表示连json传值,解析都不会的人,表示连jQuery才刚刚学的人,要怎么写报表!哎 ,不过既然交代下来,就努力的向前冲
highcharts 报表 基本知识
现在只是知道怎么按照上面的一点点知识,改图形,和换数据而已,连最基本的数据怎么传进去都不知道怎么弄,
不过,没关系啦,神一样的少年,不怕困难的。
看一下最基本的 chart.events 事件监听器。这个在报表中很有用处的。知悉一下怎么用,不然要是老大问起来,不会用很尴尬的。 同样是highcharts中文API上的,哈哈!!
API都快被我复制黏贴完了。
addSeries,此函数作用是动态增加图的数据项
在线试一试: Alert on add series click : Function 中/英 | 有更好的翻译? Since 1.2.0
图表单击事件,在单击图表是触发该函数。变量 this 表示图表对象,event 当做参数传递给事件函数, event 包含了基于jQuery 或 MooTools (取决于你用哪个 s库)事件的常见信息。
click: function(e) { console.log( Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', e.xAxis[0].value), e.yAxis[0].value ) } 在线试一试: Alert coordinates on click drilldown : Function 中/英 | 有更好的翻译? Since 3.0.8drilldown是一个chart里的函数,此函数作用是点击钻点后下钻出新的chart图,为了形象的理解请查看demo
在线试一试: 异步下钻 drillup : Function 中/英 | 有更好的翻译? Since 3.0.8drillup是一个chart里的函数,此函数作用与drilldown相反
load : Function 中/英 | 有更好的翻译?load是一个chart里的函数,此函数作用是当chart加载完后加载的函数
在线试一试: 弹出图片加载信息 redraw : Function 中/英 | 有更好的翻译? Since 1.2.0redraw是一个chart里的函数,此函数作用是重画
在线试一试: 弹出图形重绘信息 selection : Function 中/英 | 有更好的翻译?选择区域后触发
在线试一试: 拖动方法事件 afterPrint : FunctionFires after a chart is printed through the context menu item or the Chart.print method. Requires the exporting module.
Rescale the chart to print beforePrint : FunctionFires before a chart is printed through the context menu item or the Chart.print method. Requires the exporting module.