Chart problem

I am testing your chart

bar + line chart, used addseries

but line chart’s is not displayed bar chart

line chart’s round displayed bar chart’s right side

like “Io” <= I is bar, o is line’s round

my code is

var barChart = new dhtmlxChart({
view : “bar”,
container:“char1”,
value:“#sales#”,
xAxis:{ template:“#year#” },
yAxis:{ start:0,end:1000,step:100 },
labe:“#sales#”
});

barChart.addSeries({
view:“line”,
value:“#test#”,
yAxis:{ start:0, end:100, step:10 },
label:“#test#”
})

If you need different chart views you need not to add series, you need create new one chart in the same container
I.e.
var barChart = new dhtmlxChart({
view : “bar”,
container:“char1”,
value:"#sales#",
xAxis:{ template:"#year#" },
yAxis:{ start:0,end:1000,step:100 },
labe:"#sales#"
});
var lineChart = new dhtmlxChart({
view:“line”,
container:“char1”,
value:"#test#",
yAxis:{ start:0, end:100, step:10 },
yAxis:{ start:0,end:1000,step:100 },
label:"#test#"
});

Thanks

But your code does not displayed line chart’s line

like this


my last code was displayed
line chart’s round is displayed barchart side

i want round displayed chart’s center


Oh, sorry
The issue from your sample is the next:
var barChart = new dhtmlxChart({
view : “bar”,
container:“char1”,
value:"#sales#",
xAxis:{ template:"#year#" },
yAxis:{ start:0,end:1000,step:100 },
labe:"#sales#"
});

barChart.addSeries({
view:“line”,
value:"#test#",
yAxis:{ start:0, end:100, step:10 },
label:"#test#"
})

  1. you have you use one common yAxis scale, i.s. the biggest one - end:1000,step:100
    In otherwise chart will draw only the last one
  2. a property label

You do not understand my issue

i want to display like this

Problem is that,

My BarChart was Biased to the left…

If you need the smooth line, use spline chart view:
dhtmlx.com/docs/products/dht … pline.html

no… i do not need smooth line…

please careful read my issue…

my issue is,

barchart was biased to the left

Locally we haven’t any biases.
We need your demo to reproduce the issue
docs.dhtmlx.com/doku.php?id=othe … leted_demo

This company can not upload file…
so, i can not upload demo file…

My code is,

var barChart1 = new dhtmlXChart({
view : “bar”,
container:“chart1”,
value : “#sales#”,
color : function(obj) {
if(obj.type == ‘A’)
return “#58dccd
else
return “#b9a8f9
},
xAxis : {
title : “Sales per year”,
template : “#year#”,
lines : true
},
yAxis : {
start : 0,
end : 1000,
step : 100,
lines : true
},
label : “#sales#”,
width : 30,
radius : 0,
border : true
});

barChart1.addSeries({
view : “line”,
line : { color : “#36abee”, width:5 },
value : “#test#”,
yAxis : {
start : 0,
end : 100,
step : 10
},
label : "#test#
});

barChart1.parse(<%= Dataset %>, “json”);

Locally everything is correct. Mada a demo for you based on your code. Screenshot and archive are attached.


P.S. Please, use EQUAL scales! I.e. fom 0 till 100 or from 0 till 1000. But not both. Chart will draw the latest one anyway.
14.01.29.rar (85.5 KB)

When i combined the bar chart and line chart I also got the same problem. what is the solution for this issue.?

I need to display the bubble in the line series should be center of the Bars. also the x-axis labels should be center of the bars(But now it is right aligned because of the line series added. before adding the line charts it is fine).

Hi, pelango24
Could you provide completed demo to inspect your case?
docs.dhtmlx.com/doku.php?id=othe … leted_demo

Hi,
Pls find the attached demo. i’m using version 3.6.
I also want to clarify the below items.

  1. How can i add chart title?
  2. Is there chart export functionality in this version?
    RightAligned.rar (82.6 KB)

Run this in IE8, Chrome.

You just need to upgrade your chart to attached version
dhtmlxChart.zip (536 KB)