I’m new to jQuery and I have a small problem.
I’m using the jQplot plugin and I have the code:
var plotName = ['bearShevaPlot', 'haifaPlot', 'tiberiasPlot', 'kfarSabaPlot', 'netanyaPlot', 'rishonLezionPlot', 'rehovotPlot', 'telAvivPlot'];
var chartName = ['bearShevaCity', 'haifaCity', 'tiberiasCity', 'kfarSabaCity', 'netanyaCity', 'rishonLezionCity', 'rehovotCity', 'telAvivCity'];
$.each(plotName,function(a,b){
chartName[a];
//console.log(chartName[a] +', '+ b);
var b = $.jqplot('/*chartName[a]*/', [haifa], {
seriesColors: ["#FF2B00"],
title:'',
seriesDefaults: {showMarker:false,lineWidth:2,shadow:false},
grid:{background:'#4C4C4C'},
axes: {
xaxis: {
min: 1,
max: 12,
tickOptions:{
formatString:'%.0f'
},
},
},
});
});
Now where I have the chartName[a] in comment (/chartName[a]/) I need to string this array but I don’t know how to do it with the ‘ char (‘) around it…
Thanks for the help and sorry for my bad English 🙂
Is this what you want?