When working with a line chart in graphael, I encountered an issue where the datapoints were dates that were not recognizable by graphael. As a workaround, I represented each date as 1, 2, 3, and so on.
However, my requirement is to display actual dates on the x-axis labels of the chart. I attempted to use the label property for this purpose, but it did not work as expected.
Below is the code snippet I used:
var lines = r.linechart(30, 30, 600, 440, [[1, 2, 3, 4, 5]], [[100, 150, 130, 85, 100]], { axisxstep: 20, nostroke: false, axis: "0 0 1 1", symbol: "circle", smooth: true }).hoverColumn(function () {
this.tags = r.set();
for (var i = 0, ii = this.y.length; i < ii; i++) {
this.tags.push(r.tag(this.x, this.y[i], this.values[i], 160, 10).insertBefore(this).attr([{ fill: "#fff" }, { fill: this.symbols[i].attr("fill") }]));
}
}, function () {
this.tags && this.tags.remove();
});