<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ColumnChart.aspx.cs" Inherits="HighchartDemo.ColumnChart" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script src="Scripts/jquery.min.js" type="text/javascript"></script>
<script src="Scripts/highcharts.js" type="text/javascript"></script>
<script src="Scripts/exporting.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
contentType: "application/json; charset=utf-8",
url: "Services/HighchartService.asmx/transactionAnalysis",
success: function (Result) {
document.getElementById("Countervalue").value = count;
var serie = new Array(Result[i].Name, Result[i].Value);
merchantname.push(Result[i].merchant_name);
successtranscs.push(Result[i].success_transcs);
failedtranscs.push(Result[i].failed_transcs);
servicetranscs.push(Result[i].service_transcs);
StackedChart(merchantname, successtranscs, failedtranscs, servicetranscs);
error: function (Result) {
function StackedChart(xvalue, merch_name, succ_val, fail_val, ser_val) {
$('#container1').highcharts({
text: 'Stacked column chart'
text: 'TransactionStatus'
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
function DrawChart(series) {
$('#container3').highcharts({
plotBackgroundColor: null,
linearGradient: [0, 0, 500, 500],
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(200, 200, 255)']
text: 'fruit market shares at a specific month, 2014'
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
setInterval(callfunc, 30000);
<form id="form1" runat="server">
<div id="container1" style="width:100%; height:400px;"></div>
<div id ="container2" style="height:20px;"></div>
<div id ="container3" style="width:100%; height:400px;"></div>
<input type="hidden" id="Countervalue" runat="server" />