There are currently: 59 anonymous users online. 0 of 204 registered users online. There have been 10505 Page Hits by 8053 users
There have been 10505 Page Hits by 8053 users
Multiple Series with negative data
C# Example Code
{ string []lables = {"Q1", "Q2", "Q3", "Q4"}; System.Random r= new System.Random(); chart.Theme = Theme.Greens; chart.Header.Text = "Profit and Loss"; chart.Series[0].Type = ChartType.Bar; chart.Series[1].Type = ChartType.Bar; chart.Series[0].Name = "Actual"; chart.Series[1].Name = "Expected"; chart.Legend.Visible = true; for (int i=0;i<2;i++) { for (int j=0;j<4;j++) { chart.Series[i].Data.Add(new DataPoint((r.NextDouble() - 0.5)* 100, lables[j])); } } }
ASP.Net C# Example
<%@ Register tagPrefix="SasqChart" Namespace="SasqChart" Assembly="SasqChart" %> <%@ Page Language="C#" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Drawing.Drawing2D" %> <%@ Import Namespace="System.Drawing.Imaging" %> <HTML> <HEAD> <title>Simple C# SasqChart Example</title> <script runat="server"> private void Page_Load(object sender, System.EventArgs e) { string []lables = {"Q1", "Q2", "Q3", "Q4"}; System.Random r= new System.Random(); chart.Theme = Theme.Greens; chart.Header.Text = "Profit and Loss"; chart.Series[0].Type = ChartType.Bar; chart.Series[1].Type = ChartType.Bar; chart.Series[0].Name = "Actual"; chart.Series[1].Name = "Expected"; chart.Legend.Visible = true; for (int i=0;i<2;i++) { for (int j=0;j<4;j++) { chart.Series[i].Data.Add(new DataPoint((r.NextDouble() - 0.5)* 100, lables[j])); } } } </script> </HEAD> <body> <SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" /> </body> </HTML>