jqPlot Examples Baseline
This particular fiddle is setup so that basic jqPlot examples can be created. It's, at this point, a generic template setup in a state that will allow a simple fork to get you up and running faster.
by godhong
HTML
<div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
<div id="imgChart1"></div>
JavaScript
data = {"Bills & Utilities":1019.11,"Uncategorized":196.57,"Home":30.29,"Entertainment":300.0,"Food & Dining":465.45,"Personal Care":63.92,"Auto & Transport":571.44};
jqData = []
$.each(data, function(k,v){jqData.push([k,v]);});
plot = jQuery.jqplot('chart1', [jqData],
{
title: ' ',
//dataRenderer: $.jqplot.ciParser,
seriesDefaults: {
shadow: true,
renderer: $.jqplot.PieRenderer,
rendererOptions: {
fill: false,
sliceMargin: 4,
showDataLabels: true
}
},
legend: { show:true }
});
var imgData = $('#chart1').jqplotToImageStr({});
console.log(imgData)
var imgElem = $('<img/>').attr('src',imgData);
$('#imgChart1').append(imgElem);