Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

accessing a teechart series brush object

Hi,

I am using RAP to add points to a chart series and modify the patter to a diagonal hatch. I am using the following code. The last line produces the error "Expected ( or [, but found brush instead. What RAP code would I need to change the brush style?

ChartMan.chart.series[1].clear;
ChartMan.chart.series[1].AddXY(1,"One','One',RGB(250,3,3));
ChartMan.chart.series[1].AddXY(2,'Two','Two',RGB(250,3,3));
ChartMan.chart.series[1].AddXY(3,'Three','Three',RGB(250,3,3));
ChartMan.chart.series[1].SeriesColor:= RGB(10,20,30);
ChartMan.chart.series[1].brush.style:= bsFDiagonal;

Note that I created a sample project in Delphi using a TChart and the same code and it worked. I thought that if the code worked in Delphi then porting the same code to RAP would also work.

Thanks

Joe

Comments

  • Note that I am using RB 17.02 and Delphi 10.1 Berlin.
  • I did end up solving this issue so I thought I would post my solution in case anyone has this issue in the future.

    i did not find any direct code that would change the brush style so I ended up creating my own pass-through function where I passed in the chart, the series number, the brush style and the brush color and then used Delphi code to make the change. It works like a charm.

    Thanks

    Joe
Sign In or Register to comment.