DataChart
- The below code (taken from the examples) results in the x and y labels appearing below the grid and running vertically straight down resulting in the below. Any ideas? Is this a stylesheet problem?
| *
| *
* |
---|
y1 |
y2 |
y3 |
x1 |
x2 |
x3 |
window.onload=function() {
var chart = new dhtmlXChart({
view:“line”,
container:“chart_container”,
value:“#sales#”,
label:“#year#”,
tooltip: “#year#”,
item:{
borderColor:“#3399ff”,
color:“#ffffff”
},
line:{
color:“#3399ff”,
width:3
},
xAxis:{
title: “Years”,
template: “#year#”,
lines: true
},
yAxis: {
title: “Sales, mil”,
lines: true,
start: 0,
end: 10,
step: 1
},
tooltip: {
template: “#year#”
}
});
var data = [{ sales: “3.0”, year: “2000”},
{ sales: “3.8”, year: “2001”},
{ sales: “3.4”, year: “2002”},
{ sales: “4.1”, year: “2003”},
{ sales: “4.3”, year: “2004”},
{ sales: “9.9”, year: “2005”},
{ sales: “7.4”, year: “2006”},
{ sales: “9.0”, year: “2007”},
{ sales: “7.3”, year: “2008”},
{ sales: “4.8”, year: “2009”}];
chart.parse(data,"json");