Tips and Frequently Asked Questions
Adding single, multi points
Depending on the chosen chart type different methods are available to add series data point values to a series. This is done via a number of overload functions of AddSinglePoint and AddMultiPoint. For some chart types, a single value per series data point is sufficient. Other chart types such as a band chart or OHLC chart require 2 or 4 values per series data point. Additional settings per data point might be necessary such as a specific chart X-axis value for a data point or a color of a data point for a histogram.
The easiest way to add points is with the method AddSinglePoint or AddMultiPoint. Alternatively the methods SetSinglePoint or SetMultiPoint can also be used to change values of some data points in a serie. Note though that when no data points are added in the series, it is required to set the number of points first with the method SetArraySize() before using SetSinglePoint or SetMultiPoint. In this example we use the Add Methods:
Example: Adding some random points for different chart types.
procedure TForm1.AddRandomSinglePoints; var i: integer; begin with AdvChartView.Panes[0].Series[0] do begin //Applies to ctLine, ctDigitalLine, ctBar, ctArea, ctHistogram, ctLineBar, //ctLineHistogram, ctStackedBar, ctStackedArea, ctStackedPercBar, //ctStackedPercArea, ctMarkers for i := 0 to 10 do AddSinglePoint(Random(50)); //Applies to ctArrow, ctError, ctScaledArrow, ctBubble, //ctScaledBubble (Random points with X an Y offset) for i := 0 to 10 do AddPoints(Random(50), XOffset, YOffset); end; end; procedure TForm1.AddRandomMultiPoints; var i: integer; begin with AdvChartView.Panes[0].Series[0] do begin //Randomly add some points ranging from 0 to 10 //Applies to ctCandleStick, ctOHLC, ctLineCandleStick for i := 0 to 10 do AddMultiPoints(Random(50), Random(50), Random(50), Random(50)); end; end;
Example: Adding points for every month of the year.
You can quickly add custom text to the X-axis by using one of the overloaded AddSinglePoint methods.
for I := 0 to 11 do begin AdvChartView1.Panes[0].Series[0].AddSinglePoint(Random(100) + 10, ShortMonthNames[I + 1]); end;
Pricing
Single Developer License
Small Team License
Site License
TMS VCL Chart
€ 125
€
70
yearly renewal
license for 1 developer
MOST POPULAR
BEST VALUE
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.