Page 1 of 1

Charting: highlight final column in series differently

Posted: Tue Apr 29, 2014 7:09 am
by John
Hallo Support,

I have been requested to create a bar chart with a single series where the final column has a different colour, as in the example:
sample chart
sample chart
S1.png (23.77 KiB) Viewed 925 times
To do this, I add a condition on the series, which in code looks as follows:

Code: Select all

            this.Item88.Conditions.Add(new Stimulsoft.Report.Chart.StiChartCondition(System.Drawing.Color.FromArgb(255, 134, 17, 11), Stimulsoft.Report.Components.StiFilterItem.Value, Stimulsoft.Report.Components.StiFilterDataType.Numeric, Stimulsoft.Report.Components.StiFilterCondition.GreaterThanOrEqualTo, "30"));
Unfortunately, this has two drawbacks:
1). at runtime in code, I must access this condition and replace the artificial value "30" with the real value of the final column. This is not such a problem and only requires a couple of lines of code.
2). The StiChartCondition only allows me to define a single colour as the first argument. This means that the other columns all have a nice gradient to them but the final column can only have one fill-colour.

Is there any way I can set up the series in the MRT to say -> take the final column and give it style XX? By the way, the number of columns can vary between 3 and 7.

Thanks and regards,

John Kitching

Re: Charting: highlight final column in series differently

Posted: Fri May 02, 2014 12:06 pm
by HighAley
Hello, John.
John wrote:1). at runtime in code, I must access this condition and replace the artificial value "30" with the real value of the final column. This is not such a problem and only requires a couple of lines of code.
Unfortunately, this is the only way to set condition of the chart now.
John wrote:2). The StiChartCondition only allows me to define a single colour as the first argument. This means that the other columns all have a nice gradient to them but the final column can only have one fill-colour.
Please, try to set the Style of the chart to Style01 or any other where Gradient is used. In this case the last column wll be with gradient too.

Thank you.