There are currently: 8 anonymous users online. 0 of 204 registered users online. There have been 10434 Page Hits by 7982 users
There have been 10434 Page Hits by 7982 users
Dual Axis with vastly differing ranges
C# Example Code
{ chart.Theme = Theme.Oranges; chart.Series[0].Type = ChartType.Line; chart.Series[1].Type = ChartType.Line; chart.Series[0].Name = "Left Axis"; chart.Series[1].Name = "Right Axis"; chart.Series[1].Group = Series.AxisGroup.SecondGroup; chart.Legend.Visible=true; double v1 = 0.0; double v2 = -10000.0; for (int i=0; i<=100; i++) { double a = (i*2) * (Math.PI/180); v1 += Math.Abs(Math.Sin(a)) * 0.0001; v2 += Math.Abs(Math.Cos(a)) * 2500; chart.Series[0].Data.Add(new DataPoint(v1, i.ToString())); chart.Series[1].Data.Add(new DataPoint(v2, i.ToString())); } }
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) { chart.Theme = Theme.Oranges; chart.Series[0].Type = ChartType.Line; chart.Series[1].Type = ChartType.Line; chart.Series[0].Name = "Left Axis"; chart.Series[1].Name = "Right Axis"; chart.Series[1].Group = Series.AxisGroup.SecondGroup; chart.Legend.Visible=true; double v1 = 0.0; double v2 = -10000.0; for (int i=0; i<=100; i++) { double a = (i*2) * (Math.PI/180); v1 += Math.Abs(Math.Sin(a)) * 0.0001; v2 += Math.Abs(Math.Cos(a)) * 2500; chart.Series[0].Data.Add(new DataPoint(v1, i.ToString())); chart.Series[1].Data.Add(new DataPoint(v2, i.ToString())); } } </script> </HEAD> <body> <SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" /> </body> </HTML>