Reputation: 1
I want to change the Horizsize/VertSize of my Series Points in a TChart.
I can change it on a manual way, but not in the c++-code itself.
Upvotes: 0
Views: 237
Reputation: 514
The series Pointer
sub-component property is only available in certain series-type classes, such as the TLineSeries
class.
Hence you need to cast your series-pointers to the appropriate derived-type first.
For a standard line chart:
// TChart * pChart - pointer to your chart component.
// Cast to appropriate derived series-type.
TLineSeries* pLineSeries = dynamic_cast<TLineSeries*>( pChart->Series[index_of_series]);
// Now you can reach the Pointer sub-component property: pLineSeries->Pointer
// Seems like each individual point(TSeriesPointer) on the series can be accessed.
// Set Vertical size and Horizontal size:
pLineSeries->Pointer->operator [](index_of_point)->VertSize = 5;
pLineSeries->Pointer->operator [](index_of_point)->HorizSize = 5;
Upvotes: 2