C# 클래스 LitDev.LDGraph

파일 보기 프로젝트 열기: litdev1/LitDev

공개 메소드들

메소드 설명
AddGraph ( Primitive xpos, Primitive ypos, Primitive width, Primitive height, Primitive title, Primitive labelX, Primitive labelY ) : Primitive

Create a graph.

AddSeriesHistogram ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void

Add a new data series to an existing graph as a histogram.

AddSeriesLine ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void

Add a new data series to an existing graph as a line graph.

AddSeriesPoints ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void

Add a new data series to an existing graph as points.

CreateTrend ( Primitive data, Primitive order ) : Primitive

Create a trend from data.

DeleteSeries ( Primitive graphName, Primitive seriesLabel ) : void

Delete an existing series on existing graph.

ExportCSV ( Primitive data, Primitive fileName ) : void

Export data series directly to CSV file (no graphing).

Help ( ) : void

This function is just to display this help. Graphs of data can be plotted as lines, points or histograms. Each series of data is a SmallBasic array with the array index reprenting the (unique) X value and the array value representing the Y value. For example: data[1] = 5 data[2] = 8 data[3] = 3 First create a graph object with AddGraph, then add series with AddSeriesLine, AddSeriesHistogram or AddSeriesPoints. Once a graph is created and plotted, the axes can be grabbed and scrolled where the hand cursor appears. The legend can also be moved. The graph can be rescaled by using the left mouse button to select a region to zoom, or the mouse wheel can be used to zoom the display. A double click will reset the scaling to the original default. A right click will bring up a menu with other features like export of image or data, displaying the cursor coordinates, hiding the legend etc. Finally the various parmeters for this method give further control of the plotting colours and behaviour.

RestartEvents ( ) : void

Restart all the graph left click mouse events.

ScaleAxisX ( Primitive graphName, Primitive min, Primitive interval, Primitive max ) : void

Set the X axis scaling. This over-rides any automatic methods.

ScaleAxisY ( Primitive graphName, Primitive min, Primitive interval, Primitive max ) : void

Set the Y axis scaling. This over-rides any automatic methods.

StopEvents ( ) : void

Stop all the graph left click mouse events.

TrendCoef ( ) : Primitive

Get the polynomial trend line coefficients for the last calculated trend using CreateTrend.

비공개 메소드들

메소드 설명
AddSeriesHitogram ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void

메소드 상세

AddGraph() 공개 정적인 메소드

Create a graph.
public static AddGraph ( Primitive xpos, Primitive ypos, Primitive width, Primitive height, Primitive title, Primitive labelX, Primitive labelY ) : Primitive
xpos Primitive /// The graph left position. ///
ypos Primitive /// The graph right position. ///
width Primitive /// The graph width. ///
height Primitive /// The graph height. ///
title Primitive /// The graph title. ///
labelX Primitive /// The X axis label. ///
labelY Primitive /// The Y axis label. ///
리턴 Primitive

AddSeriesHistogram() 공개 정적인 메소드

Add a new data series to an existing graph as a histogram.
public static AddSeriesHistogram ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void
graphName Primitive /// The graph name. ///
seriesLabel Primitive /// The series label. /// If a series with this label already exists then it is replaced with this series. ///
data Primitive /// An array holding the X and Y coordinate data. /// /// For example, a line with points (0,1) and (2,3) would have /// data[0] = 1 /// data[2] = 3 /// /// More generally data[x] = y. ///
colour Primitive /// The colour of the series data. ///
리턴 void

AddSeriesLine() 공개 정적인 메소드

Add a new data series to an existing graph as a line graph.
public static AddSeriesLine ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void
graphName Primitive /// The graph name. ///
seriesLabel Primitive /// The series label. /// If a series with this label already exists then it is replaced with this series. ///
data Primitive /// An array holding the X and Y coordinate data. /// /// For example, a line with points (0,1) and (2,3) would have /// data[0] = 1 /// data[2] = 3 /// /// More generally data[x] = y. ///
colour Primitive /// The colour of the series data. ///
리턴 void

AddSeriesPoints() 공개 정적인 메소드

Add a new data series to an existing graph as points.
public static AddSeriesPoints ( Primitive graphName, Primitive seriesLabel, Primitive data, Primitive colour ) : void
graphName Primitive /// The graph name. ///
seriesLabel Primitive /// The series label. /// If a series with this label already exists then it is replaced with this series. ///
data Primitive /// An array holding the X and Y coordinate data. /// /// For example, a line with points (0,1) and (2,3) would have /// data[0] = 1 /// data[2] = 3 /// /// More generally data[x] = y. ///
colour Primitive /// The colour of the series data. ///
리턴 void

CreateTrend() 공개 정적인 메소드

Create a trend from data.
public static CreateTrend ( Primitive data, Primitive order ) : Primitive
data Primitive /// An array holding the X and Y coordinate data. /// /// For example, a line with points (0,1) and (2,3) would have /// data[0] = 1 /// data[2] = 3 /// /// More generally data[x] = y. ///
order Primitive The polynomial order for the trend line. /// 1 is linear. /// 2 is quadratic. ///
리턴 Primitive

DeleteSeries() 공개 정적인 메소드

Delete an existing series on existing graph.
public static DeleteSeries ( Primitive graphName, Primitive seriesLabel ) : void
graphName Primitive /// The graph name. ///
seriesLabel Primitive /// The series label name to delete. ///
리턴 void

ExportCSV() 공개 정적인 메소드

Export data series directly to CSV file (no graphing).
public static ExportCSV ( Primitive data, Primitive fileName ) : void
data Primitive /// An array holding the X and Y coordinate data. ///
fileName Primitive /// The CSV output file name. ///
리턴 void

Help() 공개 정적인 메소드

This function is just to display this help. Graphs of data can be plotted as lines, points or histograms. Each series of data is a SmallBasic array with the array index reprenting the (unique) X value and the array value representing the Y value. For example: data[1] = 5 data[2] = 8 data[3] = 3 First create a graph object with AddGraph, then add series with AddSeriesLine, AddSeriesHistogram or AddSeriesPoints. Once a graph is created and plotted, the axes can be grabbed and scrolled where the hand cursor appears. The legend can also be moved. The graph can be rescaled by using the left mouse button to select a region to zoom, or the mouse wheel can be used to zoom the display. A double click will reset the scaling to the original default. A right click will bring up a menu with other features like export of image or data, displaying the cursor coordinates, hiding the legend etc. Finally the various parmeters for this method give further control of the plotting colours and behaviour.
public static Help ( ) : void
리턴 void

RestartEvents() 공개 정적인 메소드

Restart all the graph left click mouse events.
public static RestartEvents ( ) : void
리턴 void

ScaleAxisX() 공개 정적인 메소드

Set the X axis scaling. This over-rides any automatic methods.
public static ScaleAxisX ( Primitive graphName, Primitive min, Primitive interval, Primitive max ) : void
graphName Primitive The graph name.
min Primitive The X axis minimum value.
interval Primitive The grid spacing interval. /// If this value is 0 then the interval is calculated from the data.
max Primitive The X axis maximum value. /// If this value is equal to min, then the maximum is calculated from the data. /// If this value is less than min, then both the minimum and maximum are calculated from the data.
리턴 void

ScaleAxisY() 공개 정적인 메소드

Set the Y axis scaling. This over-rides any automatic methods.
public static ScaleAxisY ( Primitive graphName, Primitive min, Primitive interval, Primitive max ) : void
graphName Primitive The graph name.
min Primitive The Y axis minimum value.
interval Primitive The grid spacing interval. /// If this value is 0 then the interval is calculated from the data.
max Primitive The Y axis maximum value. /// If this value is equal to min, then the maximum is calculated from the data. /// If this value is less than min, then both the minimum and maximum are calculated from the data.
리턴 void

StopEvents() 공개 정적인 메소드

Stop all the graph left click mouse events.
public static StopEvents ( ) : void
리턴 void

TrendCoef() 공개 정적인 메소드

Get the polynomial trend line coefficients for the last calculated trend using CreateTrend.
public static TrendCoef ( ) : Primitive
리턴 Primitive