I checked the version of plottable which is used on the example page. It's 2.7.0!
Could it be that the examples and tutorials are a little bit outdated...?
chart.js
$(document).ready(function () {
var xScale = new Plottable.Scales.Linear();
var yScale = new Plottable.Scales.Linear();
var xAxis = new Plottable.Axes.Numeric(xScale, "bottom");
var yAxis = new Plottable.Axes.Numeric(yScale, "left");
var plot = new Plottable.Plots.Line();
plot.x(function(d) { return d.x; }, xScale);
plot.y(function(d) { return d.y; }, yScale);
var data = [
{ "x": 0, "y": 1 },
{ "x": 1, "y": 2 },
{ "x": 2, "y": 4 },
{ "x": 3, "y": 8 }
];
var dataset = new Plottable.Dataset(data);
plot.addDataset(dataset);
var chart = new Plottable.Components.Table([
[yAxis, plot],
[null, xAxis]
]);
chart.renderTo("div#chart");
});
I'm currently evaluating plottable.
Based on the tutorial (http://plottablejs.org/tutorials/basics/) I created a line chart. But only the x-axis is rendered.
I checked the version of plottable which is used on the example page. It's 2.7.0! Could it be that the examples and tutorials are a little bit outdated...?
chart.js
index.html