PHP Classes

File: vendors/gentelella/vendors/flot.orderbars/examples/js/main.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/flot.orderbars/examples/js/main.js   Download  
File: vendors/gentelella/vendors/flot.orderbars/examples/js/main.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 1,194 bytes
 

Contents

Class file image Download
// DATA DEFINITION function getData() { var data = []; data.push({ data: [[0, 1], [1, 4], [2, 2]] }); data.push({ data: [[0, 5], [1, 3], [2, 1]] }); return data; } // ORDERED & STACKED CHART var orig_data = getData(); // Add order: 0 to the existing bars for(var i = 0; i<orig_data.length; i++) { orig_data[i].bars = { order: 0 }; orig_data[i].stack = true; } orig_data.push({ data: [[0, 4], [1, 1], [2, 3]], bars: { order: 1 }, stack: true }); orig_data.push({ data: [[0, 7], [1, 2], [2, 3]], bars: { order: 1 }, stack: true }); $.plot($('#stacked-ordered-chart'), orig_data, { bars: { show: true, barWidth: 0.4 } }); // Don't want any logs for the working examples // STACKED CHART var d = getData(); for(var i = 0; i<d.length; i++) { d[i].stack = true; } $.plot($('#stacked-chart'), d, { bars: { show: true } }); // ORDERED CHART var d = getData(); for(var i = 0; i<d.length; i++) { d[i].bars = { order: i } } $.plot($('#ordered-chart'), d, { bars: { show: true, barWidth: 0.4 } });