This project has moved and is read-only. For the latest updates, please go here.

Legend Population

Sep 12, 2010 at 7:55 PM

I was wondering is there a way i can populate the values of the legend with the values i want displayed?

I think this has been the issue i was fighting before not understanding what i wanted displayed.

Sep 13, 2010 at 8:51 PM

You can only set the legend values from the X-series values in the current release (like the pie chart i sample 6).

 I guess you want to add a list of string values? The only way to add that is to write to the ChartXml yourself. You can check the syntax by editing the sheet in Excel the way you want it, save it as a .xlsx document --> rename *.zip and extract. Look at the chart.xml files in \xl\charts.

My test looked like this

- <c:strLit>
  <c:ptCount val="4" /> 
 <c:pt idx="0">
 <c:pt idx="1">
 <c:pt idx="3">

Not that easy, so if its an option for you use a range instead. I hope I can add something better in the future.