You can use the dataRendererOptions parameter to declare possible files, for example:
plo12 = $.jqplot('chart2', jsonurl,{ title: 'AJAX JSON Data Renderer', dataRenderer: ajaxDataRenderer, dataRendererOptions: {file1:'name_of_file_1', file2:'name_of_file2'} axes: { xaxis: {
The following use of for-each to iterate through dataRendererOptions - Object:
var ajaxDataRenderer = function(url, plot,op) { var ret = null; $.each(op,function(i,n) { $.ajax({
This code is not test, but the idea may suit your needs.
source share