Greetings.

First let me say I love this module. It's the first charting module that works as advertised so I'm very pleased.

My website has a dark back ground and I've figured out how to change the back ground color (by inserting "'backgroundColor' => 'black'," in the options array.

What I'm having a bear doing is changing the legend and title text styles. Could you give me some direction? I'd appreciate it.

Rob

Comments

JurriaanRoelofs’s picture

Status: Active » Postponed

I think the Google Charts API does not support this yet, not sure.

dayer4b’s picture

I added this around line 135 of the file views_dataviz_plugin_style_dataviz.inc:


        'options' => array(
          // transparent background
          'backgroundColor' => array('fill'=>'transparent'),
          'forceIFrame' => FALSE,
          'titlePosition' => 'in',
          'chartArea' => $chartArea,
          'title' => $one ? $this->display->display_title : $title,
        ),

I believe you could add any CSS color value there.

dayer4b’s picture

Oops, I just got what you were talking about.

You can do this for those text styles / colors:


        'options' => array(
          // transparent background
          'backgroundColor' => array('fill'=>'transparent'),
          'forceIFrame' => FALSE,
          'titlePosition' => 'in',
          'chartArea' => $chartArea,
          'title' => $one ? $this->display->display_title : $title,
          // title is red
          'titleTextStyle' => array('color'=>'red'),
          // legend text is green
          'legend' => array('textStyle' => array('color'=>'green') ),
        ),

more ideas here: https://google-developers.appspot.com/chart/interactive/docs/gallery/pie...