Code: Select all
document.getElementById('DivChart').innerHTML = "";
Code: Select all
document.getElementById('DivChart').innerHTML = "";
That would be great.If not, maybe i could set up a test htm-file to show what i mean.
Code: Select all
Highcharts.setOptions({
colors: [
'#bbbbbb',
'#cccccc',
'#eeeeee'
]
});
Code: Select all
dataParser: function(data) {
// The real data are in the Results member
data = data.Results;
// Highcharts needs y, not qty
for (var i = 0; i < data.length; i++) {
data[i].y = parseFloat(data[i].qty);
}
return data;
}
Thank you very much for your help. This was the answer for one problem (defining #eee instead of #eeeeee) but not the first one. But when i saw it working on your version it gave me a clue that maybe i had an outdated version of the library. So i pointed the src to your online version and everything worked perfectly! I guess you must have done something the last few days that solved this problem with the colors. Thanks again.admin wrote:@gibson:
I think it was the shorthand color notation that messed it up for you. Currently Highcharts needs 6-digit HEX codes. See http://www.highcharts.com/cases/smartkalkyl.htm.Code: Select all
Highcharts.setOptions({ colors: [ '#bbbbbb', '#cccccc', '#eeeeee' ] });
Code: Select all
dataParser: function(data) {
result = [],
jQuery.each(data, function(i, val) {
result[i] = [val.name, parseInt(val.qte)];
});
return result;
},
Code: Select all
formatter: function() {
if (this.series.name == 'Something') return false;
}