Skip to content

Instantly share code, notes, and snippets.

@EduardoLopes
Last active December 16, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EduardoLopes/5426966 to your computer and use it in GitHub Desktop.
Save EduardoLopes/5426966 to your computer and use it in GitHub Desktop.
PPW.init({
charts : [
{
type : 'line',
element : '#first',
chartOptions : {
animation : true
},
chartData : {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [65,59,90,81,56,55,40]
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [28,48,40,19,96,27,100]
}
]
}
},
{
type : 'bar',
element : '#second',
chartOptions : {
animation : false,
scaleLineColor : "rgb(120,200,10)"
},
chartData : {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [65,59,90,81,56,55,40]
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [28,48,40,19,96,27,100]
}
]
}
}
]
});
<section>
<div class="slide-header">
<h2>Bar chart</h2>
</div>
<!--<canvas id="first" height="550" width="950"></canvas>-->
</section>
<section>
<div class="slide-header">
<h2>Pie chart</h2>
</div>
<!-- second the chart is not 'render', because the script don't find the first -->
<canvas id="second" height="550" width="950"></canvas>
</section>
<section>
<div class="slide-header">
<h2>Bar chart</h2>
</div>
<canvas id="first" height="550" width="950"></canvas>
</section>
<section>
<div class="slide-header">
<h2>Pie chart</h2>
</div>
<canvas id="second" height="550" width="950"></canvas>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment