The chart code:
Code:
deliveries_chart = new Ext.chart.LineChart({
id: "deliveries_chart",
height: 235,
width: 580,
hidden: true,
store: store,
yField: "description",
xField: "day",
xAxis: new Ext.chart.TimeAxis({
displayName: "Date",
hideOverlappingLabels: true,
labelFunction: "format_date"
}),
yAxis: new Ext.chart.CategoryAxis(),
extraStyle: {yAxis: {labelSpacing: 2}}
});
Relevant code from the store (I use some utility function to create the actual store, as part of the grid seen in the picture below the chart):
Code:
fields:
[
{name: "id", type: "int"}, /* for identification only */
{name: "day", type: "date", type: "date",
dateFormat: mysql_date_format_short},
"description"
],
sortInfo: {field: "day", direction: "ASC"}