[WONTFIX] Data generated for the Last visits graph should make it transparent by default not white


(vnese) #1

The generated flash graph uses the json data generated from the url:

<object ........>
<param name="flashvars" value="data-file=piwik_path/index.php?
module=VisitsSummary&action=getEvolutionGraph&columns[]=nb_visits&idSite=1
&period=day&date=2010-02-02,2010-03-03
&viewDataTable=generateDataChartEvolution
&id=VisitsSummarygetEvolutionGraphChart_swf&loading=Loading...">
</object>

and by the default, the background color is white.

In trunk/core/Visualization/Chart.php ,line 201, I would like to change this

$this->chart->set_bg_colour('#ffffff');

to this

$this->chart->set_bg_colour('-1');

to make it easier for me to embed the transparent flash chart to web page which already has a background image.

thanks for a great product and sorry for my english


(vipsoft) #2

I haven’t tested this across any browser platforms and Flash versions, but if this works for you, then it would rely on undocumented behaviour that we won’t support.

beginFill takes a 24-bit colour (uint) and an optional alpha (defaults to 1.0; opaque). There’s no mention that the colour can also include an 8-bit alpha value in the unused byte.

Looking at the edge cases, such an interpretation would not make sense. For example, in the absence of the alpha parameter, a colour value of #00FFFFFF would have be interpreted as having alpha = 0, rather than default to 1.0. Similarly, a colour value of -1 is bitwise equivalent to #FFFFFFFF and would be interpreted as having alpha = 1.0 (opaque; not transparent).


(vnese) #3

The trick to make transparent flash chart was found here:

http://forums.openflashchart.com/viewtopic.php?f=4&t=1294&p=4781&hilit=transparent#p4781

And just like you said, I think this behavior is not supported by the documentation because I couldnt find it any where there.

However, I really want to have this feature so I will ask for this in the OFC forum instead. Thank you for your time.