How i can get the xAxis end value?

Hi how i can get the xAxis end value ??? and show on graph

Hi
Do you mean the last one?
Which way do you load the data?

Hi, i mean last value in the xAxis massive
for example
i have xAxis value
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
and i show only %5 values on xAxis
5,10,15
and i want show ,5,10,15,17

and how i can change table width

[code]




[/code]

for example if last value = 17 then width=600px, but if last value = 18 then width must be 610px

or can chart have autowidth ??? (when change number of xAxis data, graphics line series show’s not correctly for static width, for 15values graphics looks normal but for 17 or 18 values on xAxis for the same width 600px graphic show not correctly, but if change table width by some pixels grafic look normal again)

You can try to use templates for labels:
docs.dhtmlx.com/doku.php?id=dhtmlxchart:dhxscale

Darya thx for your reply. but your link don’t have any useful information for my question …
i load data from json format file

???

Sorry, misled you…
Youe need to modify your custom template for xAxis:

xAxis: { template: "'#year#", start: 0, end: 20, step: 5, template: function(obj) { if (obj.id == chart.last()) return obj.year; return (obj.year % 5 ? "": obj.year); } }

for example if last value = 17 then width=600px, but if last value = 18 then width must be 610px

The size of the div should be set before chart initialization. Here is the example of the json array as chart datasource:

[code]var length = dataset.length;
if(length>17)
document.getElementById(“chart1”).style.width = 600 + 10*(length - 17) + “px”;

var chart1 = new dhtmlXChart({
container:“chart1”,

});
chart1.parse(dataset,“json”);[/code]

if the size of the chart container is set after chart creation, you need to call resize() method:

var chart1 = new dhtmlXChart({
container:“chart1”,

});

document.getElementById(“chart1”).style.width = “650px”;
chart1.resize();