<%@ Page Language="C#" MasterPageFile="~/test/test.master" AutoEventWireup="true" CodeFile="highcharts.aspx.cs" Inherits="test_highcharts" Title="" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> <script src="http://yuxnet.blog.163.com/blog/../Com/js/jquery-1.6.4.min.js" type="text/javascript"></script> <script src="http://yuxnet.blog.163.com/blog/../Com/js/highstock/highstock.js" type="text/javascript"></script> <script src="http://yuxnet.blog.163.com/blog/../Com/js/highstock/modules/exporting.js" type="text/javascript"></script> <script type="text/javascript"> var FundAGICode = '0025'; $(function() { $.ajax({ type: 'get', url: 'highcharts-data.aspx', data: { 'FundAGICode': FundAGICode }, cache: false, success: function(result) { //result = "([[1109116800000, 29.9], [1109203200000, 44.46]])"; var data = eval(result); // Create the chart window.chart = new Highcharts.StockChart({ chart: { renderTo: 'container' }, rangeSelector: { selected: 1 }, title: { text: '儲存淨值走勢圖' }, series: [{ name: '净值', data: data, tooltip: { valueDecimals: 2 } }], //隐藏右下角的highcharts.com credits: { href: '', text: '' }, //隐藏右上角的打印和导出图标 exporting: { enabled: false } }); } }); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <div id="container" style="height: 500px; min-width: 500px; width: 800px;"> </div> </asp:Content>