i have created a simple chart by using HighChart please give me some suggestions and guide how can i get value from database
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Chartz.aspx.cs" Inherits="Chartz" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-3d.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>
$(function () {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Medicine market shares 2016'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Medicine share',
data: [
['Epilepsy medicines', 45.0],
['Biological medicines ', 26.8],
{
name: 'Ciclosporin ',
y: 12.8,
sliced: true,
selected: true
},
['Mesalazine ', 8.5],
['Lithium ', 6.2],
['Others', 0.7]
]
}]
});
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="row col-md-offset-1" data-spy="scroll" style="padding:80px 0px 0px 10px;" >
<div id="container" style="height: 400px"></div>
</div>
</asp:Content>
i want to get value from database its working now and i have hard coded value please give me guide or reference link Help in advance
seriesattribute, then you can change it toseries: <%= GetData() %>and create a protected function in the code behind called,GetData(), that returns a string. Get the data from your database and build the string as required by HighChart .