Skip to Content
0

Define colors when having more than 15 members to display in infochart

Apr 02, 2017 at 07:48 PM

96

avatar image
Former Member

When selecting the colors on the properties for the infochart object, you can define up to 15 colors. But what if I have more than 15 members to display? How do I define member nr. 16 and up?

I could do it with css, but I need use a bubble chart to do my visualization, and here the nth child is not aligned between the legend order and the nth child order...

I have adjustet the CSS from this post, which works, but I still can't align the colors between the legend and the chart https://answers.sap.com/questions/53050/css-for-column-chart-with-3-measures.html

any suggestions to define colors when having more that 15 measures?

nthdcild.png (221.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Tammy Powlas
Apr 02, 2017 at 09:38 PM
0

Well, an "easy" alternative is to use the Chart component; but this is old technology in terms of Design Studio. But no CSS is required and you have more than 15 colors


142chart.jpg (73.2 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 03, 2017 at 06:02 AM
0

Thank you Tammy, but the chart object is not possible when running 1.6 sp3 ui5 m mode.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 03, 2017 at 09:44 AM
0

Could you define all 18 colours using CSS? That way you wouldn't care whether the order on the chart corresponds with the order in the legend.

A.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

That was my initial plan, but the problem is, the ordering in the legend is not the same, as the ordering in the CSS... This means I cannot align colors in the chart and on the legend...

//thomas

0
Former Member
Former Member

Why does it matter what is the order in the legend? Sorry, I guess I am not seeing something obvious :-)

You could try identifying which CSS entry corresponds to which legend entry. Set all 18 members to the same colour and then introduce one colour at a time in the CSS code and see where it appears in the legend. You already know that 1st CSS child will appear as 18th in the legend. Change colour of the 2nd CSS child and see which entry in the legend it is etc. until you know all the positions.

0
Former Member

Hi Agata,

Thanks for your answer, which would be a good solution, if the chart was static :-)

The problem is, that when the values of the key figures changes and the placing of each bubble changes, the "css-number" changes. Thus the nth-child 1 is not always displayed as the 18th number on the legend.

//thomas

0
Former Member
Former Member

Thomas,

Yes, I would be expecting this behaviour. But from the bubble chart point of view, it doesn't matter which colours represent which blob on the chart, as long as you can define them. It would, perhaps, make a difference for a columns chart if the colours changed all the time, but for a bubble chart like yours it shouldn't matter, should it?

0
Former Member

I agree, but I still don't see how you can align the colors for the bubbles with the colors of the legend. How can you determine which bubble is connected to which legend item?

The first bubble (css-wise) is only determined by it's key figure value, not which color or order it has it the legend..

//thomas

0
Former Member
Former Member

That's exactly it - bubbles appear at random places depending on the measure, not the legend. The order of your legend is specified by your data source (in your example it's members names in ascending order), but the bubbles will appear where they need to appear, according to the measure value, and it won't be in a particular order. So you can't define that the bubble on the furthest left will be pink, and the one in the middle will be red etc. because you don't know where they are going to appear. And this is what the native settings are doing as well - just fixing colours in the legend, but not for the bubbles.

0