cancel
Showing results for 
Search instead for 
Did you mean: 

BSP Using HTMLB:Chart

Former Member
0 Kudos

I am generating charts within my BSP using the htmlb:chart extension. I do not specify the colors for my charts because I could not get the colors to match up with the colors that are produced in the legend. Aside from this, the charts look okay msot of the time. However, when I have more than say, ten X values with four or five groupings, the colors generated are all the same. In other words, for multiple groups, the more X values I have, the less differention between assigned colors.

Our WAS is at release 6.20 and we have the latest IGS patches applied.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

check if the sample bsps are of any help. check htmlb_samples bsp->chart.htm and chartsamle.htm.

regards,

manasa

Former Member
0 Kudos

Manasa,

Thank you for your reply. However, I've tested the sample chart.htm and even when I change the specified colors, they do not match up with the legend colors. Maybe there is something going on with our IGS setup.

In the sample BSP, are you able to change the colors for each group and have the legend colors match?

Regards,

Calvin

Former Member
0 Kudos

calvin,

<i>are you able to change the colors for each group and have the legend colors match?</i>

i didnot understand what you meant by legend colors.

i changed the colors in the sample. this is what i did:

1) in the chartsample.htm event handler-oninitialization i changed the color number of groupid microsoft, 3rd quarter to red-- line-color = 48.

and now i got 2 bars in the chart with red color. earlier only one bar was red.

2) another way of changing color of the whole chart is by "color order".

execute the chart.htm and there change the colororder(default, straight, snake,reverse).

is this what you were doing and its not working for you?

regards,

manasa

Message was edited by: manasa

Former Member
0 Kudos

Manasa,

Not only did I change the colors, but I added additional groups each with their own color. After doing this, the legend no longer matched my chosen colors. For example, one group uses black, but black does not appear in the legend. Are you able to duplicate this?

Regards,

Calvin

Former Member
0 Kudos

Calvin,

I had similar legend issue when i used combination of htmlb:chart and IGS. I would suggest you to use graphics:chart instead of htmlb:chart, that will solve your legend issue. I am not sure you can solve legend issue with combination of htmlb:chart and IGS.

Thanks!

Lakshmikandh

kai_gutenkunst
Active Contributor
0 Kudos

Hi,

changing the color with htmlb:chart is only possible for single points, i.e. you can use it to highlight special data points (exceptions). It's not meant to change the color of a complete series. That's the reason why the color within the legend doesn't change!

graphics:chart is a good recommendation! And don't forget to download the SAP Chart Designer from SDN - Downloads. That will ease creating the customizing XML.

Regards, Kai

Former Member
0 Kudos

Lakshmikandh,

I was afraid that converting to graphics:chart may be the solution. We have created many charts using htmlb:chart - how difficult is it to convert?

I can resolve my legend issue by simply using the system default colors. However, then I have the issue of my colors all being rendered with very little contrast when I have 5 or 6 groups and many x values.

Regards,

Calvin

Former Member
0 Kudos

Calvin,

It is not very difficult to convert to graphic chart. I have spent a week to convert around 30 graphics. Please take a look at example of GRAPH_BSP_TEST BSP application, which will give you idea of how to use graphics chart. You need to create a class and need to implement graph custom model and graph data model interface. Please download SAP chart desinger for creating xml files. Have you tried with chart with applet? if you disable the IGS ,it will generate a chart using applet but it won't display the object values on the chart. I would suggest you to use graphics chart.

Weblog for graphics chart

/people/thomas.jung3/blog/2004/08/31/bsp-150-a-developer146s-journal-part-x--igs-charting

Thanks!

Lakshmikandh

Former Member
0 Kudos

Lakshmikandh,

Thanks. I will look into graphic:chart sometime down the road. For now I've resolved my issue by assigning my own colors and creating my own legend to display on the screen. Thank you for you input.

Regards,

Calvin