Allow charts to track click events and perform a certain action. The action taken can be:
Open Flash Chart does support on-click events (see Open Flash Chart On-click).
I propose adding support for a "special" column (like "label"), say "click_url", which Piwik's widgetize module would recognize and add on-click functionality to the chart. Each data value in that column would either be a JS function, a URL or a [module,action] pair (for datafile).
I think adding interactivity to the charts would be a great feature!
Keywords: chart, graph
Piwik already uses this feature but does not expose it as a general purpose feature to widget authors.
"Datafile" isn't possible with the current version of OFC2.
URL is already supported by the Evolution chart. See Piwik_Visualization_Chart->setAxisXOnClick().
anush, did you try using Piwik_Visualization_Chart->setAxisXOnClick() ?
Does it work as expected for you? if yes, we could close the ticket.
I did take a look after vipsoft mentioned it. I wasn't having too much luck with it for my development purposes. Then again, my dev environment is in bit of disarray at the moment. Give me another day or two -- I can delve a bit more deeper and definitively say "yay" or "nay".
Thanks for your diligence.
Ok, here are my thoughts...
#!php // %s is dynamically replaced by the value in the specified column (in this case, "label") setAxisXOnClickURL('http://example.com?page=%s', 'label'); setAxisXOnClickJS('alert(%s)', 'label');
1- agreed. Would you be able to provide a patch for this?
2- patch looks good, we can commit, let's wait for 1) and 3)
3- again, agreed with the concept. if you are able to provide a patch for this, it would help getting it done.
sure, i'll try to take a stab at 1 & 3.
anush, any update?
no news from dev, wont fix. Please comment if any update.