Jump to content

Additional pie chart formatting


CCS_Printing

Recommended Posts

A customer wants to make the color diamonds bigger in the legend and remove the two decimal points in the percentage and just show whole numbers. I saw a previous thread saying that font, size, color, placement and style options are the only formatting options available for the legend. That was from 2011, is that still true? I thought perhaps I could format that in the tagged chart rule (called out in the Copyhole Name field in the the Define Chart dialogue) but I also read that the only tags allowed for a chart are <row> and <cell>, so I don't think I can apply formatting to the field values there.

 

I'm not sure on enlarging the color diamonds. I would just place a static one over the generated ones, but the position shifts based on the length of the numbers...

 

Basically, I just want to see if there are any updates for formatting the pie chart legend, or any new tricks. Thanks!

Link to comment
Share on other sites

We have not made any significant changes to charting functionality in quite some time.

 

But you can create your own legend by writing a rule to read in the chart data. You can output Webdings characters for the diamond glyphs, in any size and color you want.

 

Your custom legend doesn't have to be static either; you can suppress the default chart legend by checking "None" on the Legend tab of the Chart Properties dialog, and then the position of the chart itself should be more or less fixed, so you can place your own legend accordingly.

Link to comment
Share on other sites

Thanks for the reply Dan. I'm pretty good at altering existing rules to perform the functions I need, but am still trying to improve at creating them from scratch. For example, I'm not sure what to use to read in the chart data for a custom legend, to get the generated percentages. Any assistance on getting started on a making a custom legend rule would be greatly appreciated. Thanks!
Link to comment
Share on other sites

Thanks for the reply Dan. I'm pretty good at altering existing rules to perform the functions I need, but am still trying to improve at creating them from scratch. For example, I'm not sure what to use to read in the chart data for a custom legend, to get the generated percentages. Any assistance on getting started on a making a custom legend rule would be greatly appreciated. Thanks!

Well, basically, you create a little table, based on the same data used to populate the chart, where each row in the table corresponds to one slice of the pie, with the percentages for each slice (which you can calculate easily enough in JavaScript by adding up the total for the data and dividing that total by each slice's number), the label for that slice, and then either a table cell with the background color for that pie slice, or a single character in a symbol font such as Webdings in that color.

Link to comment
Share on other sites

  • 1 year later...

Pie Charts and colors....

 

When assigning the color to a pie chart(In the "Chart Properties" -> "Chart Colors" -> "Selected Colors:" list) they have to be placed in the corrosponding order as the copy hole rule that the chart is acting on. However if you wright the rule to drop data for empty data fields the data moves up in the order of the color in the pie chart throwing off your item to assigned color. Reading this thread I'm getting the idea there is no way to assign the pie chart color inside the rule to avoid this. Is that correct?

 

Tks

Link to comment
Share on other sites

Ok, I got there taking a different tact. Placed 0's in the empty fields which removes the color section in the pie chart without changing colors. Then I created a rule for "my" legend that removed the line if the value is zero (Of course this could be left to display 0% I suppose).
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...