Horizontal bar Chart

Hello,

i need to create an horizontal bar chart with the origin in 0. If the bar is positive goes to the right else to the left. Now the system shift the origin, so i have the bars only to the right.
I’m able to do this with the vertical bar chart but not with the horizontal.
Any suggestios?

Thanks for the help.

Hello,

the attach library allows to set origin for the barH chart. This feature will be inluded into the Suite 3.0.
dhtmlxchart.zip (35.5 KB)

view:“barH”,
container:“chart”,
value:"#val#",
label: “#val#”,
color: “#ffcc00”,
yAxis: {
template: “#instr#”,
title: “Instrument”
},
xAxis: {
start:-2,
end:12,
step:1,
title: “PL”
},

origin: 0,
gradient: true,
border: false

The system parts from -2 (it seems that doesn’t take origin:0) so if i have -1.75 i see a bar taht parts from -2 and arrives to -1.75 so it goes to right.

in attachment what i see.


We’ll fix this issue in 3.0 version.