Using Bluff Charts

Last updated on
30 April 2025

Installation

Usage

The quickest code to get something graphed using bluff:


function charts_graphs_mytest() {
  $canvas = charts_graphs_get_graph('bluff');
    
  $canvas->title = "Bluff Chart";
  $canvas->type = "line"; // a chart type supported by the charting engine. See further in the doc for the list.
  $canvas->y_legend = "Y Legend";
  $canvas->colour = '#D54C78';
  $canvas->theme = 'keynote';  
  $canvas->series = array(
    'Some Value' => array(9,6,7,9,5,7,6,9,7),
    'Page Views' => array(6,7,9,5,7,6,9,7,3),
  );
  $canvas->x_labels = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine');
  
  $out = $canvas->get_chart();

  return $out;
}

Chart Types Supported

[line] => Line
[bar] => Bar
[pie] => Pie
[area] => Area
[sidebar] => Sidebar
[side_stacked_bar] => Side Stackedbar
[stacked_area] => Stacked Area
[stacked_bar] => Stacked Bar

Help improve this page

Page status: Not set

You can: