Avalonia solo in codiceEnglish

API › RAVAL

RChart class

Il riferimento e' in inglese: viene dai commenti del sorgente di RAVAL, che dalla 2.0 ha nomi e commenti in inglese.

public class RChart : Control

A line chart with markers.

Costruttori

RChart()

An empty chart.

Proprietà

double MinX { get; set; }

The lowest abscissa shown (NaN: from the data).

double MaxX { get; set; }

The highest abscissa shown (NaN: from the data).

bool TimeAxis { get; set; }

Whether the abscissas are times, seconds as RTime.X writes them: the divisions fall on round times, the labels are hours or dates.

bool Zoomed { get; }

Whether the user has zoomed or moved the view (ResetView undoes it).

(double, double) RangeX { get; }

The abscissas shown in the last drawing.

(double, double) RangeY { get; }

The ordinates of the left axis shown in the last drawing.

List<RSeries> Series { get; }

The curves.

List<RLimit> Limits { get; }

The limit lines.

List<double> Markers { get; }

The abscissas of the markers.

string TitleY { get; set; }

The title of the left axis.

string TitleY2 { get; set; }

The title of the right axis ("" if no curve uses it).

string UnitX { get; set; }

The unit of the abscissas, written with the SI prefix.

bool LogX { get; set; }

Whether the abscissa is logarithmic.

double MinY { get; set; }

The lowest value shown on the left axis (NaN: from the data).

double MaxY { get; set; }

The highest value shown on the left axis (NaN: from the data).

string BackgroundKey { get; set; }

The theme resource of the background.

string GridKey { get; set; }

The theme resource of the grid.

string InkKey { get; set; }

The theme resource of the texts and the frame.

double TextSize { get; set; }

The size of the texts.

Func<double, string> FormatX { get; set; }

How an abscissa is written (null: RFormat.Si with UnitX). A method group, for example chart.FormatX = Degrees;.

CultureInfo Culture { get; set; }

How the numbers of the axes and of the markers are written: the point (invariant, the default), as RTable, RCsv and RFormat write them; set CultureInfo.CurrentCulture for the comma of the computer.

Rect PlotArea { get; }

The area of the curves in the last drawing, pixels.

Metodi

void SetView(double x0, double x1, double y0 = NaN, double y1 = NaN)

Shows the abscissas from x0 to x1 (and, if given, the ordinates from y0 to y1).

void ResetView()

Shows all the data again (and MinX, MaxX, MinY, MaxY if set).

void ZoomX(double x, double factor)

Zooms the abscissa by a factor around x (2: half the span); on a logarithmic axis around x in decades.

void ZoomY(double y, double factor)

Zooms the left ordinate by a factor around y.

double ValueY(Point p)

The ordinate of the left axis under a pixel.

void Refresh()

Redraws after a change of the curves.

double PixelX(double x)

The pixel of an abscissa (after the first drawing).

double PixelY(double y)

The pixel of an ordinate of the left axis.

double ValueX(Point p)

The abscissa under a pixel (NaN outside the curves).

void Render(DrawingContext ctx)

Draws background, grid, curves, limits, markers, legend.

Eventi

event Action ViewChanged

After the wheel or a drag has changed the view.

event Action MarkersChanged

After a click has changed the markers.