Table of Contents

Tooltip clash

Shows only the first value when two or more points fall on the same position

JSON

{
  "elements": [
    {
      "type": "line",
      "values": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ]
    },
    {
      "type": "line",
      "values": [
        10,
        9,
        8,
        7,
        6,
        5,
        4,
        3,
        2,
        1
      ]
    }
  ],
  "tooltip": {
    "shadow": false,
    "clash": false
  }
}

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 );
 
$t = new tooltip( 'Hello<br>val = #val#' );
$t->set_shadow( false );
$t->set_clash( false );
$chart->set_tooltip( $t );
 
echo $chart->toPrettyString();
 
ofc2/features/tooltip-clash.txt · Last modified: 2011/01/29 08:43 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