If Open-Flash does work perfectly from Views, it is not possible to select from Views "amcharts". But seeing the code it is more an issue for Views Charts than Chart and Graphs?

Cause I didn't manage to use the amchart support of the module, unfortunately (in Views or directly in php)...

Comments

eme’s picture

By the way, when I try to change in PHP some code so as to try to get amcharts, I get "You need to upgrade your Flash Player" message...but I have the lastest verions (and with another one, older, same message), which is more related to this module.

BarisW’s picture

I can confirm this. Couldn't get amChart to work either.
I downloaded all files and put them in sites\all\modules\charts_graphs\apis\amcharts\downloaded

Nu success..

Anyone?

Sinan Erdem’s picture

Same here. Openflash works alright. But I dont see the amCharts option in the options menu of the Views.

eme’s picture

The displaying is not a problem coming for this module : it just has not been enabled in Views Chart. It is the same for the line support of openfhash that is normally available (see #563682: Openflash Line support and amchart support).

For example, if in the file views_plugin_chart_graph of the Views module you write (line 75) '#options' => array('open-flash' => t('Open Flash'),'amcharts' => t('amcharts')), instead of just array('open-flash' => t('Open Flash')),, you'll see the amchart line. The thing being that the option should be updated (a dynamic form should be implemented, as the 'bar' OpenFlash is actually 'column' in amchart, etc.).

But when using it I see (Your need to upgrade your Flash Player) : so Views Chart did not pass the right arguments. I'll try to dig a bit into this, but some help from the maintainer would be a plus... Any help is welcome!

edit : okay, it begins to work a bit. I'll post later on my discoveries.;)

eme’s picture

Actually it works (dont know why I did not suceed) if you have the files in the right directory.

The thing is that the features are defined directly in the module and are quite basic which means you don't have any of the nice effect you are waiting for while installing amcharts. Things need to be done again. I'll work on this next week, and post those interested updated. Any help is appeciated of course.

eme’s picture

Category: support » feature
irakli’s picture

Thank you, I will try to fix these in the Head branch.

eme’s picture

I did some testing (but with a quite dirty code : it just works but needs to be really improved an cleaned) that could interest you :
I changed the way $settings is defined :

title!='Page') {
$settings=str_replace('TITRE', '<![CDATA[<b>'.$this->title.'</b>]]>', $settings);
}
else
{
$settings=str_replace('TITRE', '', $settings);
}
if ($this->y_legend!='') {
$settings=str_replace('YAXIS', '<![CDATA[<b>'.$this->y_legend.'</b>]]>', $settings);
}
else
{
$settings=str_replace('YAXIS', '', $settings);
}
if ($this->colour!='') {
$settings=str_replace('COLOR', $this->colour, $settings);
}
else
{
$settings=str_replace('TITRE', '', $settings);
}

Having a text file like this :
<settings><colors>CC0000,FF6600,FCD202,B0DE09,0D8ECF,2A0CD0,CD0D74,CC0000,00CC00,0000CC,DDDDDD,999999,333333,990000</colors><background><alpha>100</alpha><border_alpha>20</border_alpha></background><grid><category><dashed>1</dashed></category><value><dashed>1</dashed></value></grid><axes><category><width>1</width><color>E7E7E7</color></category><value><width>1</width><color>E7E7E7</color></value></axes><values><value><min>0</min></value></values><depth>15</depth><column><width>85</width><balloon_text>{title}: {value} downloads</balloon_text><grow_time>3</grow_time></column><graphs><graph gid='0'><title>Stock</title><color>ADD981</color></graph><graph gid='1'><title>Column</title><color>7F8DA9</color></graph><graph gid='2'><title>Line</title><color>FEC514</color></graph></graphs><labels><label lid='0'><text>TITRE</text><y>18</y><text_color>000000</text_color><text_size>15</text_size><align>center</align></label><label lid='1'><text>YAXIS</text><y>!50</y><text_color>000000</text_color><text_size>12</text_size><rotate>true</rotate><align>center</align></label></labels></settings>

Which is basically the code from http://extra.amcharts.com/editor/column/, having just changed and put TITLE, Y-AXIS. I did not found any feature to be able to set the beginning Y axis in amcharts.

The other possible settings can be found here : http://www.amcharts.com/docs/v.1/bundle/settings/column_bar.

eme’s picture

So, as the module creator will work on this (and I am quite busy), I won't work more on the module unlesse irakli wants a hand from me.

If anyone wants a basic version of the module that works with amcharts, you can do the changes proposed above + change views charts (more precisely views_plugin_style_chart.inc) like that (like 75 or so) :
'#options' => array('open-flash' => t('Open Flash'),'amcharts' => t('amcharts')),
Note that bar_3D won't work for amcharts

If asked I'll upload here a zip with my own version (it is not really clean coding, but it works and amchats is fully configurable with the editor).

ioseb’s picture

We already implemented chart chooser, now it generates list automatically from already installed APIs and it is possible to choose chart and its specific chart types... btw wmode parameter support is included as well just download dev version

Thank you

ioseb’s picture

Status: Active » Fixed
Sinan Erdem’s picture

Status: Fixed » Active

downloaded Bluff javascript package and put into relevant place (apis/charts_bluff/bluff). And although I can see amCharts and Open Flash options, I cannot see Bluff option under Views...

AntiNSA’s picture

Can you be very specific??? I would like to try a different chart... but you have several posts and Im not so clear on what exact code I have to do to get the chart to show. Can you clarify?

danieldd’s picture

Anyone who is trying to get amcharts to work with Charts & Graphs/ Views charts see also this (posted in wrong issue queue): http://drupal.org/node/578336#comment-2153734

irakli’s picture

Project: Charts and Graphs » Views Charts
Version: 6.x-1.0-alpha4 » 6.x-1.x-dev
irakli’s picture

Status: Active » Fixed

This problem is now fixed in CVS. Release coming soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.