diff --git a/example-quickstart.markdown b/example-quickstart.markdown index 9ae86229..266d8e6c 100644 --- a/example-quickstart.markdown +++ b/example-quickstart.markdown @@ -71,10 +71,11 @@ Note that behind the scenes Recline will create a Memory backend for this datase Let's create a data grid view to display the dataset we have just created, binding the view to the `
` we created earlier: {% highlight javascript %} +var $el = $('#mygrid'); var grid = new recline.View.Grid({ - model: dataset, - el: $('#mygrid') + model: dataset }); +$el.append(grid.el); grid.render(); {% endhighlight %} @@ -93,3 +94,83 @@ $el.append(grid.el); grid.render(); +### Creating a Graph + +Let's create a graph view to display a line graph for this dataset. + +First, create a new div for the graph: + +{% highlight html %} + +{% endhighlight %} + +Now let's create the graph, we will use the same dataset we had earlier: + +{% highlight javascript %} +var $el = $('#mygraph'); +var graph = new recline.View.Graph({ + model: dataset +}); +$el.append(grid.el); +graph.render(); +{% endhighlight %} + +And ... we have a graph view -- with instructions on how to use the controls to +create a graph -- but no graph. Go ahead and play around with the controls to +create a graph of your choosing: + +