projects / org / ezproject2010 / cplot / news / cplot 0.1beta released
Find the Exponential Software extensions you want
Changed cplot fetch function to template operator. Now supports flash, svg, and png. Can plot line, bar, pie,and radar charts as flash, svg, and png, but can only display candle charts as flash.
A sample can be found at "site_admin_url/cplot/test. Be aware, svg files is not supported by IE.
================
Installation
================
1) Copy cplot into 'extension' folder
2) Activate cplot
In administrator user interface, click 'setup' tab->'extensions' menu, select 'cplot', click button 'Apply Changes'.
or in settings/override/site.ini.append.php, add acivation configuration under "ExtensionSettings" section:
[ExtensionSettings]
ActiveExtensions[]=cplot
3) Regenerate autoloads
In administrator user interface, click 'setup' tab->'extensions' menu, select 'cplot', click button 'Regenerate autoload arrays for extensions',
or in eZ Publish installation folder, run "php bin/php/ezpgenerateautoloads.php -e"
4) Clear cache
Clear INI and template caches. (from admin 'Setup' tab or commandline)
Here's a sample:
{cplot('MyChart','flash', 'pie', hash( 'y', array(50,100), 'x', array('test','first')),'x','y',450,400)}
====
required fields
====
title=MyChart
render=flash
type=pie
data=hash( 'y', array(50,100), 'x', array('test','first'))
====
optional
====
xlegend='x'
ylegend='y'
width=450
height=400
================
Samples
================
<h2>flash</h2>
{def $data=array(
hash(
'high', 10,
'open', 2,
'close', 4,
'low', 5
),
hash(
'high', 20,
'open', 10,
'close', 13,
'low', 8
)
)}
<br />
{cplot('MyChart','flash', 'candle', $data,'x','y',400,400)}
{set $data=hash( 'y', array(0,100))}
{cplot('MyChart','flash', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(0,100), 'x', array(-2,3))}
{cplot('MyChart','flash', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array(-2,3))}
{cplot('MyChart','flash', 'bar', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array('test','first'))}
{cplot('MyChart','flash', 'pie', $data,'x','y',400,400)}
{set $data=hash( 'y', array(3, 4, 5, 4, 3, 3, 2.5), 'x', array('0sdsa','1','2','3','4','5'))}
{cplot('MyChart','flash', 'radar', $data,'x','y',400,400)}
<h2>png</h2>
{def $data=hash( 'y', array(0,100))}
{cplot('MyChart','png', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(0,100), 'x', array(-2,3))}
{cplot('MyChart','png', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array(-2,3))}
{cplot('MyChart','png', 'bar', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array('test','first'))}
{cplot('MyChart','png', 'pie', $data,'x','y',400,400)}
{set $data=hash( 'y', array(3, 4, 5, 4, 3, 3, 2.5), 'x', array('0sdsa','1','2','3','4','5'))}
{cplot('MyChart','png', 'radar', $data,'x','y',400,400)}
<h2>svg</h2>
{def $data=hash( 'y', array(0,100))}
{cplot('MyChart','svg', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(0,100), 'x', array(-2,3))}
{cplot('MyChart','svg', 'line', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array(-2,3))}
{cplot('MyChart','svg', 'bar', $data,'x','y',400,400)}
{set $data=hash( 'y', array(50,100), 'x', array('test','first'))}
{cplot('MyChart','svg', 'pie', $data,'x','y',400,400)}
{set $data=hash( 'y', array(3, 4, 5, 4, 3, 3, 2.5), 'x', array('0sdsa','1','2','3','4','5'))}
{cplot('MyChart','svg', 'radar', $data,'x','y',400,400)}
Log in or create a user account to comment.
Comments