Hello,
I have a situation where i am clicking on a list of names and building chart series with some options on the fly like:
for (var i = 0; i < data.Data.length; i++) {
chartOptions.valueAxis.push({
name: data.Data[i].name + '-' + i,
min: data.Data[i].data.min(),
max: data.Data[i].data.max(),
title: {
text: data.Data[i].name + '-' + i,
visible: false
},
visible: true
});
}
// Draw Series Axes
for (var i = 0; i < data.Data.length; i++) {
chartOptions.series.push({
axis: data.Data[i].name + '-' + i,
data: data.Data[i].data,
color: seriesOptions[i].color,
highlight: {
markers: {
visible: true
}
},
name: data.Data[i].name + '-' + i,
markers: {
visible: true
},
style: seriesOptions[i].style,
type: seriesOptions[i].type,
});
}
// Draw Categories Axes
chartOptions.categoryAxis.categories = [];
for (var i = 0; i < data.Categories.length; i++) {
chartOptions.categoryAxis.categories.push(data.Categories[i]);
}
Now what is happening is for each series that i add, one new value axis is added too. My question is:
Is it possible to keep all this functionality but somehow default to have just a single value axis shown all the time while also keep the value axis array in match with the series array ?
I have attached a picture in case i am not being clear with what i am trying to achieve.