How to Disable Drill Through on Pentaho Charts

I have some dashboard pages which show charts that are purely informational. They don’t need to click to anywhere. In fact, since I’m loading these charts via AJAX calls I do not want them to be linked. I want them to be images without any URLs and no clicks.

200810031517
All of those bars / lines etc I just want to have hovers (to see the values, but no click through locations).

However, after looking through all the documentation and code for it, I couldn’t find a single way to suppress the generation of hyperlinks for the charts. Sure, I could get the image from the ChartComponent but then I wouldn’t get the hover values. Until it occurred to me. Why not just make a URL link that does nothing?

Adding the following fragment to the chart definition can make the link, in essence, do nothing and not even refresh the page. Meets my needs.

<use-base-url>false</use-base-url>
<url-template>javascript:;</url-template>

Not ideal though. It still shows the user a clickable area so the user may think the application isn’t working properly. I think BISERVER-2222 will be better in the long term but a stop gap measure that helps my customers for sure.

One thought on “How to Disable Drill Through on Pentaho Charts

  1. neroliang

    Hello, I am getting interested on your example– pentaho charts. I am coping with such a simlar case. But Obviously I am a newbie on creating such chart in Pentaho.

    Do you mind offering your solution-files(.xml, .xaction, .jsp),
    It would be awesome helpful for me, Thank you in advance.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *