Korax Report post Posted February 7, 2007 I`m working on a Chart where the user has to be able to click on every single data point to call a javascript with the corresponding values. Moreover the user has to be able to click on the whole chart to call another link. My problem here is that somehow the layer from the ClickURL link is higher than the layer from the data point links so the data point links never get called if a ClickURL is assigned. I want the chart to call the data point link when a data point is clicked and call the ClickURL when anywhere else is clicked. Help needed! :w00t: greetings Andrew PS: damn cool smiley's :cool: Share this post Link to post Share on other sites
Pallav Report post Posted February 8, 2007 I'm afraid this is not currently possible, as we allow either clickURL or normal links. Share this post Link to post Share on other sites
Korax Report post Posted February 8, 2007 My company bought the Fusionchart Enterprise edition therefore we are allowed to modify the source code. Is there an easy way to change the chart itself to accomplish that? (easy means up to 8-10 hours of work ) Share this post Link to post Share on other sites
Pallav Report post Posted February 9, 2007 You'll need to make the following change. For each chart, locate the main rendering function which draws the click elements. Like for column chart, the columns are click handlers and as such drawColumns() is the function to look for (in com/fusioncharts/core/charts/<<Chart Type>>.as). Now, in this, we've the code: if (this.data [i].link != "" && this.data [i].link != undefined && this.params.clickURL == "") { //Create delegate function fnClick = Delegate.create (this, columnOnClick); //Set index fnClick.index = i; //Assign colMC.onRelease = fnClick; } else { //Do not use hand cursor colMC.useHandCursor = (this.params.clickURL == "") ?false : true; } Just remove this.params.clickURL == "" from the condition. That ways, both clickURL and the columns would have their own link. Share this post Link to post Share on other sites
Korax Report post Posted February 10, 2007 Big thanks for this code snipped, i haven`t had the time to change any chart yet but i definitely will! Share this post Link to post Share on other sites