Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS VCL Chart
Customizing the drawing of the markers.

A marker can be selected. Set the SelectedColor and the SelectedSize property. Click on the marker at runtime, the marker will be shown in the selected color & size. To add code when a marker is clicked you can use the SerieMouseDown or SerieMouseUp event. This can be used for example to add an annotation at a specific point of the series.

It is possible to customize the drawing of the markers. Select mCustom as marker type and use the event OnMarkerDrawValue. Follow sample code snippet shows how this can be done:

type 
  TForm1 = class(TForm) 
  private
     { private declarations } 
  public
     { public declarations } 
    procedure DrawMarker(Sender: TObject; Serie: TChartSerie; Canvas: TCanvas; X, Y,Point: integer; value: TChartPoint); 
  end;
Assign this procedure to the serie for which markers you want to customize the drawing.
AdvChartview.Panes[0].Series[0].OnMarkerDrawValue := DrawMarker;
Markers also support picture drawing. Select mPicture and load a picture in the markerpicture property. The picture below is an example of the combination of custom and picture drawing.