Highchart图形报表
2017-03-13 15:37
330 查看
http://www.highcharts.com/demo/
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Chart-update.aspx.cs" Inherits="AngularJS.Chart_update" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Chart-update</title> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/highcharts-more.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> </head> <body> <form id="form1" runat="server"> <div> <div id="container"></div> <%-- <button id="plain">Plain</button> <button id="inverted">Inverted</button> <button id="polar">Polar</button>--%> </div> </form> <script> var chart = Highcharts.chart('container', { title: { text: 'Chart.update' }, subtitle: { text: 'Plain' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ type: 'column', colorByPoint: true, data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], showInLegend: false }] }); //$('#plain').click(function () { // chart.update({ // chart: { // inverted: false, // polar: false // }, // subtitle: { // text: 'Plain' // } // }); //}); //$('#inverted').click(function () { // chart.update({ // chart: { // inverted: true, // polar: false // }, // subtitle: { // text: 'Inverted' // } // }); //}); //$('#polar').click(function () { // chart.update({ // chart: { // inverted: false, // polar: true // }, // subtitle: { // text: 'Polar' // } // }); //}); </script> </body> </html>
//data可以直接绑定返回的数组
//如下所示 var item_subno = []; var price = []; var dataService = { ID: "ID", //查询-返回实体值.ds Args: { } }; Service.Core.executeDataService(dataService, function(ret) { //console.log(ret); //F12打开开发者工具,在控制台中就可以查看 //Common.Dialog.alertDetail(ret); if(ret.length > 0) { for(var i = 0; i < ret.length; i++) { item_subno.push(ret[i].item_subno); price.push(ret[i].price); } } var chart = Highcharts.chart('container', { title: { text: 'Chart.update' }, subtitle: { text: 'Plain' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ type: 'column', colorByPoint: true, data:price,//[29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], showInLegend: false }] }); });
相关文章推荐
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考(二)
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考及中文解决方案
- 关于highChart图形中,环形图像,文字居中的处理
- highchart 报表及 单击事件
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考
- android通过achartengine-1.0.0.jar做图形报表
- highchart演示各种图形画法
- highcharts做图形报表去掉highcharts.com的版权信息
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考
- highchart动态生成图形
- 图形报表之jQuery HighchartTable基础入门
- 图形化报表之Highchart报表
- 图形报表 webChart.dll 以及其它的图形报表控件 (转)
- Asp.net 2.0图形报表制作chart(原作)
- 关于报表分析中的图形展现应用(2)(fusionchart)
- HighChart报表之饼图
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考及中文解决方案
- ChartDirector与JreeChart这两款web图形报表工具比较
- 轻量级图形报表工具JSCharts (JSChart),内置函数中文参考
- highcharts做图形报表如何去掉highcharts.com