jquery chart plugin : jqPlot : Customize the view

var plot1 = jQuery.jqplot (targetElementId, [data],
    {
        seriesDefaults: {
            // Make this a pie chart.
            renderer: jQuery.jqplot.PieRenderer,
            rendererOptions: {
                // Put data labels on the pie slices.
                // By default, labels show the percentage of the slice.
                showDataLabels: true
            }
        },
        grid: {
            drawGridLines: true,        // wether to draw lines across the grid or not.
            gridLineColor: '#cccccc',   // *Color of the grid lines.
            backgroundColor: 'transparent',      // CSS color spec for background color of grid.
            borderWidth: '0px',
            borderColor: 'none',
            shadow: false,
            borderColor: 'transparent', 
            shadow: false, drawBorder: false, shadowColor: 'transparent'
        },
        legend: {
            show:true,
            location: 's',
            'margin-left': '12px'
        }
    }
);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s