Charts
You can create different kinds of charts: Pie, Line, Horizontal Line, Fast Line, Bar, Horizontal Bar, Area, Horizontal Area, Point.
-
Pie
-
Line
-
Horizontal Line
-
Fast Line
-
Bar
-
Horizontal Bar
-
Area
-
Horizontal Area
-
Point
Creating charts in NodeActa system is simple. You can use ChartView control shipped with the system. Example how to create a chart can be found in Samples→Chart Sample
app.
Hint
ChartView control is also a nice example how to create a custom control using C++, Delphi or any other environment that can produce a .dll. ChartView is located at UI→UI Controls→Chart View
and is actually just a wrapper around nodeacta.charts.dll. Also notice that CharView contains 2 dlls, nodeacta.charts.x86.dll and nodeacta.charts.x64.dll. This approach allows you to use the same control for 32bit and 64bit platforms.
Code Example
Hint
For information on the available ChartView properties, please explore UI→UI Controls→Chart View
code.
import { ChartView } from "nodeacta:UI.Controls.ChartView";
...
var chart = new ChartView(this);
chart.width = '500';
chart.height = '500';
chart.view3D = true;
chart.title.text = 'Chart Title';
chart.legend.legendAlignment = ChartView.LegendAlignment.Left;
let bar = chart.series.addBar();
bar.add('label 1', 10, 323, 'Blue');
bar.add(undefined, 10, 133, 'Orange');
bar.add(undefined, 30, 343);
bar.add('label 2', 50, 500);
...
To save a chart as a file, use the chart.saveToFile(path)
method. Provide the path
parameter with the appropriate file extension (.jpg, .png, .bmp, etc) to select needed image format.