Open Flash 차트의 항목을 강조 표시합니다
-
23-08-2019 - |
문제
내가 어떻게 할 수있는 가장 밝은 부분 정확히 하나의 항목 (특히 X 축의 라인) 오픈 플래시 차트 2?
참고 : 하이라이트는 색상 또는 대담한 변화 일 수 있습니다.
해결책
각 축 레이블을 개별적으로 스타일링 할 수 있습니다. 문서에서이를 수행하는 방법의 예가 있습니다.
http://teethgrinder.co.uk/open-flash-chart-2/x-xaxis-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 );
제휴하지 않습니다 StackOverflow