• Multiple legends/charts ont he same Xpage

    By Eric Tomenga 5 years ago


    I have an existing dojox charting application that I developed. I was never able to get Legends working. Part of the issue is that since it is a Dashboard based application I have all the charts on one Xpage visible based on panels. The arrangement works fine and there are no speed or resource issues. However, when I introduce Legends the chart stops rendering. I am hoping to try this method and just need to figure out how to make this work with referencing multiple legends panels or divs. The method I am using to render multiple charts on one page was created by Julian Buss (yn_charts_render).

    • By Paul S Withers 5 years ago

      It sounds like it may be throwing a Dojo error, possibly something to do with IDs. I don't think this widget will solve that problem - it's an extension of the core Dojox class to give the option to make it multi-column.

      I have an XPage with multiple charts, each with a legend on it. That's working, but I'm using a custom control for the chart, passing in the data for the chart put also a numeric variable (e.g. 1, 2, 3). Instead of using:

      var chart = new dojox.charting.Chart2D(“#{id:simplechart}“);

      I then use:

      var chart#{javascript:passedKey} = new dojox.charting.Chart2D(“#{id:simplechart}“);

      So wherever I'm using a JavaScript variable to refer to the chart, I'm using a different variable for each chart. That works for a single XPage with multiple charts each with its own legend. Not sure if that will solve youor problem too. (Alternatively, it might be throwing a Dojo error to the Firebug console which may help identify the cause.)

      • By Eric Tomenga 5 years ago