Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
using a field other than the category axis label in a interactive chart url
deeebee
Hi,
I have a report with a chart on it. I would like to be able to have a user click on a bar in the chart and have it open a url with some data about the thing the bar represents. The issue is that I don't want the category axis value to be the parameter, it's a readable label but not the key I need to run another query with, but another field from the data set used to build the chart. Is there any way I can access the other data values in the interactive URL or Invoke Script menu? I notice that in the mouseover menu I can access the actual data items in the report dataset but in the url menu I can access none and the invoke script menu I can only access the chart data items.
Any help would sure be appreciated.
Thanks
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? If I do a hyperlink in 2.6.2, I can see all of the chart fields in the URI expression builder.
deeebee
Maybe that's the issue. I'm using 2.5.2 and all I see on the hyperlink and invoke script options for adding interactivity to a series in a chart are the category data or the series values. I guess we should look at upgrading to the latest version.
Thanks for you prompt response.
Richard
deeebee
I think I have found where you mean. It's in the *Location javascript builder. The only problem with that is that I now have access to all the column bindings but not the chart data, so when I add in something like the seriesname it stops working.
for example I put in this:
"
http://www.google.co.uk/search?ie=UTF-8&oe=UTF-8&q="
; + valueSeriesName;
and when I run the report there is no URL at all.
It seems I can have one or the other but not both...
mwilliams
Can you explain more about where you're talking about then? Is the other value you want to access something you could set into persistentGlobalVariables outside the chart? Then you'd be able to access these PGV's from within the chart script. Let me know on both.
deeebee
Sure, Thanks for taking the time to help me out Michael.
I hadn't actually seen the builder dialog in the URI expression builder. I had been using the invoke script action and just constructing a javascript open window command because I couldn't see how to include a script to construct the URL from the editor.
I need to combine data from the x-axis label and the series label to build a URL which I can call when I click on the bar in a bar chart.
The data set I am using is actually a cube of data because I need to pivot the incoming data set. My data looks like this
stress_test|MARKET#MSCI#UP|MARKET#MSCI#DOWN
portfolio|20|30
I need this pivoted to put into a bar chart group by stress test
I end up with the data in the cube like this
STRESS_TEST|UP|DOWN
MSCI|20|30
So now I can put this into a bar chart. When I click on say, the up bar, I need to construct a string MSCI_UP which I can build into the URL so call the appropriate drill down report.
If I click on the chart in the designer and open the "Edit Chart" screen.
I go to the format tab and click on series 1, then I click on the interactivity button.
I go to mouse double click and choose "Hyperlink" and click add in the "Hyperlink Editor" dialog
Then I click "Edit base URL"
With the "URI"radio button selected I click the "Javascript Syntax" button next to the location field to open the expression builder. now here I have access to the available columns, which aren't available in the "invoke script" menu, and, under the Variables category I have access to the chart data points.
However, if I try and use the chart data points in this dialog then I get no hyperlink in the resultant report. The columns work fine but as soon as I try and use a chart data point the hyperlink is gone from the resultant report.
I cannot set a global variable because I need to know which series has been clicked on before I construct the URL. If I cannot get the name of the series in the dialog editor I will not know this and not be able to construct the URL correctly.
Hope that makes some sense..!
Richard
mwilliams
Richard,
I see what you're saying. This seems like a bug to me for sure. Please log a bug for this at
http://www.birt-exchange.org/org/resources/bug-reporting/
. Maybe they'll have an explanation to why it doesn't work how the editor inserts it. I'll let you know if I figure anything else out.
I tried this in 2.6.2 with the same result, btw.
deeebee
Thanks for confirming. Good to know I'm not going mad!
Richard
mwilliams
Not a problem. Please put the bug info in here after you file so that it can be referenced later. Thanks!
deeebee
forgot to add the bug info in here:<br />
<br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=346939'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=346939</a>
;
mwilliams
BIRT 3.7.0 was just released yesterday. You might download it and give it a try in that version.