root/plot/Pybrary.Plot/Series.cs

Revision 746, 1.5 kB (checked in by mfenniak, 2 years ago)

--

Line 
1 using System;
2 using System.Collections.Generic;
3 using System.Drawing;
4
5 namespace Pybrary.Plot
6 {
7     public delegate void SeriesEventHandler();
8
9     public abstract class Series
10     {
11         private string yAxisName = "Default";
12
13         public event SeriesEventHandler OnSeriesChanged;
14
15         public Series()
16         {
17         }
18
19         public string YAxisName
20         {
21             get
22             {
23                 return yAxisName;
24             }
25             set
26             {
27                 yAxisName = value;
28                 raiseSeriesChanged();
29             }
30         }
31
32         protected void raiseSeriesChanged()
33         {
34             SeriesEventHandler tmp = OnSeriesChanged;
35             if (tmp != null)
36                 tmp();
37         }
38
39         public abstract double GetXValueByIndex(int index);
40         public abstract double? GetYValueByIndex(int index);
41
42         public abstract double? MinY { get; }
43         public abstract double? MinY_gt_Zero { get; }
44         public abstract double? MaxY { get; }
45         public abstract double? MinX { get; }
46         public abstract double? MinX_gt_Zero { get; }
47         public abstract double? MaxX { get; }
48
49         public abstract void Draw(Graphics g, AxisCollection yAxisCollection, XAxis xAxis, AdvancedRect area);
50         public abstract int TextExport(List<string> rows, string name);
51
52         public abstract IEnumerable<LegendEntry> LegendEntries { get; }
53     }
54 }
Note: See TracBrowser for help on using the browser.