Table of Contents

Null Gap for Line charts

This feature allows for a gap in lines when there is a null value.

JSON

{
  "elements": [
    {
      "type": "line",
      "values": [
        1,
        2,
        3,
        null,
        null,
        6,
        7,
        null,
        9,
        10
      ],
      "null-gap": true
    },
    {
      "type": "line",
      "values": [
        10,
        9,
        8,
        null,
        null,
        5,
        4,
        3,
        2,
        1
      ]
    }
  ]
}

PHP

$chart = new open_flash_chart();
 
$line_dot = new line();
$line_dot->set_values( array(1,2,3,null,null,6,7,null,9,10));
$line_dot->set_null_gap( true );
$chart->add_element( $line_dot );
 
$line_dot = new line();
$line_dot->set_values( array(10,9,8,null,null,5,4,3,2,1));
$chart->add_element( $line_dot );
 
echo $chart->toPrettyString();
 
ofc2/features/null_gap.txt · Last modified: 2011/01/29 08:46 by etw
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki