function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Layered Visualforce Charts

All -


So I think I just need direction on a place to start. I have been using google Charts and Visualizations to display complex scatter charts and line graphs. They way I have accomplished this is through the use of long text fields that contain up to 4K plot point in the X and 4000 in the Y field. This has allowed me to do some really great displays.


Now my user is asking me if I can layer my line graphs. Each line graph has it's own X and Y. To be clear, they rarely share a location on a graph (ie...X1 != X2 or Y1 != Y2). I have read and viewed many layered sales graphs that use the same year or month, but I do not have that commonality in mine. 


Is there a way to do a layered line graph with up to 6 lines where the only constant is my Max and Min? Can someone point me in the right direction? I would like to use VF Charts if at all possible.


Thank you in advance for any assistance you can provide.




You can display mulitple line series together in a single chart.  See "Adding a Second Data Series" in link below.


Not sure I get "where the only constant is my Max and Min", but you could do apex:axis.steps="0" which would display just the bottom and top values on the axis.


To answer the constant question, only the size of the graph and that it is a line graph are the constants. I could have 1 line with one set of X and Y or 6 lines with 6 sets. I am not sure how to create this variability in the controller and page. If it were always 4 layers I could account for that. Any suggestions?




Use *series.rendered="<condition>"?


Trying dynamic components where you'd compose the apex:chart and its children in Apex and render into an apex:dynamicComponent.