NGChart is .NET class library to work with Google Chart API. Which provides simple classes and methods to generate google charts.
Example
BarChart chart = new BarChart(BarsType.Grouped, BarsDirection.Vertical,
new ChartSize(420, 125),
new ChartData(new int[][]
{
new int[] { 20, 1, 25, 26, 51 },
new int[] { 7, 12, 60, 57, 4 }
}) );
chart.Colors = new ChartColors(new Color[] { Color.DodgerBlue, Color.YellowGreen });
chart.Legend = new ChartLegend(new string[] {"Winter", "Summer"});
//chart.ToString() is return google chart image URL
imgChart.ImageUrl = chart.ToString();
NGChart will generate an URL (Google API) for above code like this:
http://chart.apis.google.com/chart?cht=bvg&chs=420×125&chd=s:UBZaz,HM85E&chco=1E90FF,9ACD32&chdl=Winter|Summer
And above API i.e. URL will display following chart,
References:
WebSite: http://code.google.com/p/NGChart
Samples : http://code.google.com/p/NGChart/wiki/NGChartSamples
Download: zip
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.