delphi - Custom painting of a gantt in TGanttSeries -


i've got need draw gantts consist of 2 subsections -- 1 painted brush has custom bitmap, , coloured in specified colour. these subsections have variable length, makes impossible have preset bitmap painting.

the current solution i'm using have 2 instances of tganttseries, firs 1 used display first kind of subsections, second -- kind of subsections. quite cumbersome approach, provides additional challenges actions need performed on gantt visually appears single entity, in fact consists of 2 different gantts 2 different tganttseries instances.

is possible provide custom painting of gantts in tganttseries single gantt represented rectangle have several subsections painted differently?

you try using ongetpointerstyle event yeray suggested here.

here example link:

  private     { private declarations }     function seriesgetpointerstyle(sender:tchartseries; valueindex:integer):tseriespointerstyle; //... procedure tform1.formcreate(sender: tobject); begin   chart1.addseries(tganttseries) tganttseries   begin     pointer.vertsize:=10;     fillsamplevalues(10);     ongetpointerstyle:=seriesgetpointerstyle;   end; end;  function tform1.seriesgetpointerstyle(sender:tchartseries; valueindex:integer):tseriespointerstyle; begin   chart1.canvas.brush.style:=tbrushstyle(2+(valueindex mod 6));   result:=psrectangle; end; 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -