JR NetworkJanuary 9 in Developer Connection
I've been trying to find more info on the way IPS handles charts, I understand it uses Google Charts and all the docs I can find on the implementation is here.
I have working charts, my issue is I'm trying to work on a dark theme for my website but a graph in a custom coded application looks horrible, I've been able to remove the background color but I can't seem to change the legend color. I'd like it to use the theme color, but I can't seemingly change it to any color.
Has anyone changed the legend color of a graph, if so how ? Also is there any hidden docs to show properties such as this from IPB? Excluding the dev doc.
Hello, you can view any graphics from the ACP section Statistics and see the controller code. For example:
$chart = new \IPS\Helpers\Chart\Callback(
\IPS\Http\Url::internal( 'app=core&module=stats&controller=onlineusers' ),
array( $this, 'getResults' ),
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'colors' => array( '#10967e', '#ea7963' ),
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
array( 'start' => \IPS\DateTime::ts( time() - ( 60 * 60 * 24 * 30 ) ), 'end' => \IPS\DateTime::create() ),
Started 1 hour ago
Started January 29
Started 3 hours ago