MChart
Home
Components
MChart
About component
MChart is component that helps you display your data as a graph.
Adding data
Chart data can be added to the Values collection as instances of the ChartValue class.
// Adds start value at [0, 0]
chart.Values.Add(new ChartValue(0, 0));
// Adds another value
chart.Values.Add(new ChartValue(4, 10));
Chart scale
Scale of the values can be set by ValueDimensions property. Scale of the grid can be set using the GridDimensions property.
// Set scale to 50x50 pixels
// Value [0, 0] = [0, 0] pixels
// Value [1, 0] = [50, 0] pixels
// Value [1, 1] = [50, 50] pixels
// Value [4, 3] = [200, 150] pixels
chart.ValueDimensions = new Size(50, 50);
// Size of the rectangles of the the grid
chart.GridDimensions = new Size(200, 200);
Class content
Assembly |
Minimal.dll |
Namespace |
Minimal.Components |
Inheritance |
MBufferedPanel |
Attributes |
- |
Implements |
IMComponent |
This list doesn’t include content derived from the parent class. See MBufferedPanel class documentation for a complete list of items.
Constructors
Name |
Description |
|
MChart() |
Initializes a new instance of the MChart class. |
|
Properties
Name |
Description |
Type |
Component |
Handles life-cycle of the M-Component. |
MComponent |
Accent |
Component’s accent color. Main visible color of the component. |
Color |
CustomTheme |
Component’s custom theme. Will override default parent M-form theme or application wide theme. |
Theme |
GridDimensions |
Dimensions of the grid. |
Size |
ValueDimensions |
Dimensions of the values. |
Size |
Values |
Collection of all chart values. |
List<ChartValue> |
Fields
Name |
Description |
Type |
- |
- |
- |
Events
Name |
Description |
Type |
AccentChanged |
Fires when the Accent property is changed. |
PropertyChangedEventHandler |
CustomThemeChanged |
Fires when the CustomTheme property is changed. |
PropertyChangedEventHandler |
Methods
Name |
Description |
Returns |
- |
- |
- |