Home / Support / Swiff Chart Generator / Simple XY Line Chart - ASP.NET
Knowledge Base

SAMPLE: Simple XY Line Chart - ASP.NET

The information in this article applies to:

  • Swiff Chart Generator 3

This example illustrates how to generate a simple XY line chart in ASP.NET

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using GlobFX.SwiffChartGenerator;

public partial class CSharp_QuickStarts_XYLine : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
// Set the heading for the graph
chart.Title"Experimental Results";

// Set chart categories
chart.SetCategoriesFromArray( new string[] { "Q1""Q2""Q3" } );

// Fill the first series named "Measure 1"
chart.SetSeriesCaption( 0"Measure 1" );
chart.SetSeriesXValuesFromArray( 0new double[] {} );
chart.SetSeriesYValuesFromArray( 0new double[] {} );

// Fill the second series named "Measure 2"
chart.SetSeriesCaption( 1"Measure 2" );
chart.SetSeriesXValuesFromArray( 1new double[] {} );
chart.SetSeriesYValuesFromArray( 1new double[] {} );

// Apply an XY (Scatter) style
      // The chart type is stored in the style file (*.scs)
      // Here the selected style is the predefined XY line style "Honolulu"
chart.LoadStyle( @"xy\Honolulu" );

chart.Looping= false;

Keywords:ASP.NET XY Line

Swiff Chart Generator