突出显示 Open Flash Chart 2 中的项目

发布于 2024-07-26 07:53:00 字数 179 浏览 3 评论 0原文

如何在 突出显示恰好一个项目(特别是 x 轴上的一条线) “nofollow noreferrer”>打开 Flash 图表 2

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

How can I highlight exactly one item (particularly a line on the x axis) in open flash chart 2?

Note: Highlight can be a change of color or bold.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽容 2024-08-02 07:53:00

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

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 );

Y 轴的类似示例

You can style each axis label separately, there's an example of how to do this in the documentation:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文