|
Re: Legend label for series when grouped by key [message #731019 is a reply to message #731005] |
Thu, 29 September 2011 17:37   |
|
Is there anyway you can share a sample report with the issue that we can
run? For example create a scripted data source and hard code some
values and add your chart. If you can post the report.
Jason
On 9/29/2011 1:01 PM, pkj5ue wrote:
> I am having this datetime chart in which I have grouped the y axis data
> by ID column. Thus the chart automatically creates all the requisite
> series. Now ID column in the legend list doesn't go for great viewing.
> So I want to replace the ID with its corresponding name. But there seems
> no way to do it :(
> I even tried a data cube. In it one can specify a display field for key
> field. So for ID key field, I had display field of associated text and
> all was good until I realized that chart is not picking up date time
> group as date time but as text!! And I cannot change the text to
> datetime. So though the legend shows fine, since the x axis is now text
> in chart, it is not scaled properly for one.
>
> I will appreciate your help.
|
|
|
|
Re: Legend label for series when grouped by key [message #731055 is a reply to message #731042] |
Thu, 29 September 2011 18:56   |
|
No it is not, but if Tag is already part of the chart data I can show
you how to get it. If it is not you can always put it in a global
variable and get it from script. Tell me which is your scenario and I
will explain how to do it.
Jason
On 9/29/2011 2:42 PM, pkj5ue wrote:
> Yeah, I will do that. But meanwhile, I was thinking if
> function beforeDrawLegendItem( lerh, bounds, icsc )
> {
> lerh.getLabel().setCaption(dataSetRow["TAG"]);
> }
> would work by looking up in dataset. But apparently dataset is not valid
> in the context of function.
|
|
|
|
Re: Legend label for series when grouped by key [message #731306 is a reply to message #731169] |
Fri, 30 September 2011 15:10   |
|
You can always uses a hidden table to load up a hashmap with key value
pairs and then use this map in the beforeDrawLegendItem to lookup the
new value. Have a look at the attached example. Notice the table is
hidden and I use an oncreate script on the table detail row to load up
the hm and then uses a beforeDrawLegendItem script to read it.
Jason
On 9/30/2011 3:37 AM, pkj5ue wrote:
> I have attached the report with a scripted data source. Report has two chart instances, one using a data set and the other data cube made from data set.
> In first example, I was unable to change the series label from id to a name from that dataSetRow.
> In the second chart example, though series label can be changed by having a different display text for id column, the x series is taken as text. I cannot change it to time :(
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02687 seconds