charts - Highcharts column color -
i'm building charts using highcharts
my problem is:
my attribute "size" on pie chart 100%. div's height , width 234 , 424px, pie smaller , doesn't bigger 130px both attributes...
is there properties use?
thanks
update:
ok guys, found answer, got newer version of highcharts plugin, problem column chart black lol, ideas?
update 2:
my code column's chart is:
//the colorbar parameter modifies 'hover' of bars
function graficobarrasimples_init(paramx, paramy, colorbar, container, title) { var options = { chart: { renderto: container, defaultseriestype: 'column' }, title: { text: '' }, subtitle: { text: '' }, yaxis: { min: 0, title: { text: 'unidade' }, tickpixelinterval: 50 }, tooltip: { formatter: function() { return '' + this.x +': '+ this.y ; } }, xaxis: [], series:[] } var = 0; var items = paramy.split(','); var itemx = paramx.split(','); var series = { type: 'column', color:[], data: [] }; var xaxis = { categories: [], title: { text:title} }; $.each(items, function(itemno, item) { series.name = itemx[itemno]; series.data.push(parsefloat(item)); series.color.push(corvalor(colorbar)); i++; }); xaxis.categories= itemx; options.xaxis.push(xaxis); options.series.push(series); var chart = new highcharts.chart(options); } final update
guys, found problem again. aparently, highcharts doesn't accept 'injection' or 'push' graph's color, line:
series.color.push(corvalor(colorbar));
so, changed 'series' property directly:
var series = { type: 'column', color:corvalor(colorbar), data: [] }; and excluded series.color.push(corvalor(colorbar)); line.
thanks!
as said, last problem in following object color must string:
var series = { type: 'column', color:[], // change color:'', data: [] }; and have set instead of push:
$.each(items, function(itemno, item) { series.name = itemx[itemno]; series.data.push(parsefloat(item)); series.color = corvalor(colorbar); i++; });
Comments
Post a Comment