Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

stacked bar - dynamically set the pen color

I am creating a stacked bar chart by using the following data:

Date Column1 Column2 Color1 Color2

09-22-08 10.92 00.00 red green

09-23-08 11.53 00.00 red green

09-24-08 60.81 -27.45 blue yellow

09-25-08 67.24 -25.81 blue yellow

09-26-08 56.63 33.36 blue green

09-29-08 91.26 12.00 blue green

I could set Color1 and Color2 as hexadecimal. . The Value Columns are Column1 and Column2 and I have added Color1 and Color2 to the datalink columns.

What I would like to do is to dynamically set the color of Pen1 and Pen2 based on the value of Color1 and Color2.

In the 'UpdateEvent', I am able to loop through the datapoints by using getDatalinkValue(1,LoopIndex,1) and getDatalinkValue(1,LoopIndex,2) to see values of Color1 and Color2 for each of the bars.

But How do I use/apply the setColor for both pens in each bar (could be a different combination)?



Former Member
Not what you were looking for? View more on this topic or Ask a question