Manipulate highcharts bar -


i'm exploring highcharts api , used stacked grouped bar charts. came on idea on changing bar's look. wanted pointed bar. possible? in advance!

image below:

enter image description here

changing column series shape might difficult because logic behind column series meant work rectangles, require extend/change highcharts internal code.

instead, can use polygon series. little of configuration, should able desired effect.

$(function() {  var labels = { 1: 'apples', 4: 'bananas' };  highcharts.chart('container', {   chart: {     type: 'polygon'   },   xaxis: [{       min: -0.5,       max: 6,       tickpositions: [0, 2, 3, 5],       labels: {         enabled: false       }     }, {         offset: 0,         linkedto: 0,       tickpositions: [1, 4],       ticklength: 0,       labels: {         formatter: function () {             return labels[this.value];         }       }     }], yaxis: {   min: 0,   max: 100 },  series: [{   name: 'series 1',   id: 's1',   colorindex: 0,   data: [     [0, 0],     [0, 25],     [2, 20],     [2, 0]   ] }, {   name: 'series 1',   linkedto: 's1',   colorindex: 0,   data: [     [3, 0],     [3, 68],     [5, 63],     [5, 0]   ] }, {   colorindex: 1,   id: 's2',   name: 'series 2',   data: [     [0, 25],     [0, 50],     [2, 45],     [2, 20]   ] }, {   name: 'series 2',   colorindex: 1,   linkedto: 's2',   data: [     [3, 68],     [3, 78],     [5, 73],     [5, 63]   ] }] }); }); 

example: http://jsfiddle.net/stfhhn7y/


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -