Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Incorporate charts such as pie & line charts

$
0
0

Hi,

I would like to know if I can create line pie and line charts using sharpdeveloper. Or is this a function that will come later.

example of what I want to try and do.

There is a chart tool where you can add your values and plot in various styles

Here's a simple example of creating a line graph with a single series containing 3 data points.

Drag a chart to your form and add this code

01PrivateSubForm1_Load(ByValsender AsSystem.Object, ByVale AsSystem.EventArgs) HandlesMyBase.Load
02     Chart1.Series.Clear()
03     Chart1.Titles.Add("Demo")
04     'Create a new series and add data points to it.
05     Dims AsNewSeries
06     s.Name = "aline"
07     'Change to a line graph.
08     s.ChartType = SeriesChartType.Line
09     s.Points.AddXY("1990", 27)
10     s.Points.AddXY("1991", 15)
11     s.Points.AddXY("1992", 17)
12     'Add the series to the Chart1 control.
13     Chart1.Series.Add(s)
14 EndSub

You will need to add Imports System.Windows.Forms.DataVisualization.Charting

Of course you would have to iterate through your data and add points based on your information.


Viewing all articles
Browse latest Browse all 1764

Trending Articles