IW

TMS IntraWeb Charts

Fast multipane financial graphs & 2D feature rich charting

Also available for:



Tips and Frequently Asked Questions

 Add custom X-axis values via an event


To override the standard X-axis values drawn by TAdvChartView an event OnXAxisDrawValue event is available for each serie. To add an event handler for OnXAxisDrawValue, declare a procedure and assign it to the serie.OnXAxisDrawValue event like in the code snippet below:
AdvChartView.Panes[0].Series[0].OnXAxisDrawValue := XAxisDrawValue;

procedure TForm.XAxisDrawValue(Sender: TObject; Serie: TChartSerie;
  Canvas: TCanvas; ARect: TRect; ValueIndex, XMarker: integer; Top: Boolean;
  var defaultdraw: Boolean);
begin
  //Insert Code here
end;
In this event, the Serie parameter returns the Serie for which the X-axis value needs to be drawn. Further, the Canvas and rectangle within this canvas where can be drawn is returned. ValueIndex returns the index of the value along the X-axis. Top indicates whether the X-axis is on top or below the chart. Finally, by setting the DefaultDraw parameter to false, the chart itself will no longer draw the X-axis value.
The technique illustrated with following sample. Some points were added in a serie and for each odd value on the X-Axis we want to display a Car brand in the X-axis:
procedure TForm.XAxisDrawValue(Sender: TObject; Serie: TChartSerie;
  Canvas: TCanvas; ARect: TRect; ValueIndex, XMarker: integer; Top: Boolean;
  var defaultdraw: Boolean);
  
const
  lst: array[0..4] of String = ('Audi', 'BMW', 'Mercedes', 'Bugatti', 'Porsche');
var
  s: String;
  th, tw: integer;
begin
  if Odd(ValueIndex) then
  begin
    Canvas.Font.Size := 12;
    s := lst[Random(Length(lst))];
    th := Canvas.TextHeight(s);
    tw := Canvas.TextWidth(s);
    Canvas.TextOut(Xmarker - (tw div 2), ARect.Top + th, s);
  end;
end;




IW

Single developer license


license for 1 developer
€ 70 yearly renewal *
€ 125


order now
add to cart

Small team license


license for 2 developers
€ 115 yearly renewal *
€ 195


order now
add to cart

Site license


unlimited developers in the company
€ 295 yearly renewal *
€ 495


order now
add to cart

CreditCards and PayPal Accepted


Compatibility

    Delphi 7, 2007, 2010, 2009, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney, 11 Alexandria, C++Builder 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney, 11 Alexandria, DXE15, CXE15 (Professional/Enterprise/Architect)


Licensing

Bookmarks