突出显示“打开Flash图表2”中的项目

时间:2009-07-04 23:31:48

标签: php open-flash-chart

我如何突出显示 open flash chart 2中的一个项目(尤其是x轴上的一行)?

注意:突出显示可以是颜色更改或粗体。

1 个答案:

答案 0 :(得分:1)

您可以单独设置每个轴标签的样式,这里有一个如何在文档中执行此操作的示例:

http://teethgrinder.co.uk/open-flash-chart-2/x-axis-labels-3.php

$x_labels = new x_axis_labels();

// Set the defaults 

$x_labels->set_steps( 2 );  // show every other label
$x_labels->set_vertical();
$x_labels->set_colour( '#ff0000' );
$x_labels->set_size( 16 );

$tmp = array();

// these labels will inherit their properties from $x_labels
// including 'visible' from the 'steps' value (which, for
// this example is 2) I have noted the inherited visible
// status for each item:

$tmp[] = 'one';         //   visible
$tmp[] = 'two';         // invisible
$tmp[] = 'three';       //   visible
$tmp[] = 'four';        // invisible
$tmp[] = 'five';        //   visible

// these will override some or all of the
// inherited properties

$tmp[] = new x_axis_label('six',   '#0000FF', 30, 270); // invisible
$tmp[] = new x_axis_label('seven', '#0000FF', 30, 270); //   visible
$eight = new x_axis_label('eight', '#8C773E', 16, 315); // would be invisible, but:
$eight->set_visible();  // <-- FORCE this label visible
$tmp[] = $eight;
$tmp[] = new x_axis_label('nine',  '#2683CF', 16, 0);   // visible

// add the labels to the X Axis Labels object
$x_labels->set_labels( $tmp );

A similar example for the Y-axis