Skip to content

Commit 79c8c39

Browse files
committed
Initial commit
git-svn-id: http://elycharts.googlecode.com/svn/trunk@2 d12c1f63-3eea-9699-2b47-88fa03d2d012
1 parent e0e4ea9 commit 79c8c39

25 files changed

+13096
-0
lines changed

bin/build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#/bin/sh
2+
3+
cat src/elycharts_defaults.js src/elycharts_core.js src/elycharts_manager_* src/elycharts_chart_* > dist/elycharts.js
4+
yui-compressor dist/elycharts.js -o dist/elycharts.min.js
5+

dist/elycharts.js

+3,794
Large diffs are not rendered by default.

dist/elycharts.min.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/changelog.txt

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
v2.0.0
2+
- refactoring completo
3+
4+
v2.0.1
5+
- ripristinato supporto label in pie e funnel
6+
- label HTML con offset
7+
- supporto passaggio anchor come elementi dom
8+
- ottimizzazione gestione mouseover
9+
- applicabile l'highlight "move" anche al funnel e migliorie ottimizzazioni generali all'highlight
10+
- nuovo grafico barline, e supporto highlight "scale" e "move"
11+
- fix vari
12+
13+
v2.0.2
14+
- supporto piechart vuoto e serie "empty"
15+
- fix passaggio width ed height
16+
- nuova opzione "interactive"
17+
- nuove opzioni highlight: scaleSpeed, scaleEasing, moveSpeed, moveEasing
18+
- applicabile highlight "scale" a funnel e piechart (prima implementazione)
19+
- supporto opzione "delay" in startAnimation
20+
- supporto valori cumulativi in line chart, opzione series[x].cumulative
21+
- supporto opzione axis[X].labelsCompactUnits (= ['k','m']) per accorciare le label numeriche con unita' (prima implementazione)
22+
- rename interno strutture codice
23+
- migliorie gestione sync animazioni
24+
25+
v2.0.3
26+
- ripristinato supporto opzione "color"
27+
- gestione transizioni grafici mediante chiamate successive a $(X).chart(...)
28+
- supporto series.stepAnimation (transizioni grafici), features.animation.startAnimation (generazione elementi non-serie), features.animation.stepAnimation (transizioni elementi non-serie)
29+
- supporto series.visible
30+
- grafico barline: supporto direction = 'rtl'
31+
- fix vari
32+
33+
v2.0.4
34+
- migliorato supporto pixelWorkAround
35+
- fix metodi interni
36+
- spostate config fadeDelay e moveDelay in opt.features.tooltip, areaMoveDelay in opt.features.mousearea
37+
- supporto opt.features.mousearea.syncTag per collegare le parti interattive di grafici diversi (se si va su uno si disattivano le altre)
38+
- migliorie posizionamento tooltip
39+
- supporto opt.features.tooltip.positionHandler per definire la propria funzione di posizionamento tooltip
40+
- supporto per passaggio di oggetti DOM/JQUERY come label
41+
42+
v2.0.5
43+
- impostato defaultSeries.axis = 'l', features.balloons.width = 0
44+
- fix stackedWith e startAnimation.grow|avg|reg
45+
- posizionamento relativo invece di assoluto per balloons
46+
- supporto linea balloons mediante features.balloons.line e features.balloons.lineProps
47+
- gestione balloon e label per ultimo indice di un funnel associato a bottom sector
48+
- supporto debug della configurazione attuale mediante libreria DP_Debug (http://www.depressedpress.com/Content/Development/JavaScript/Extensions/DP_DeBug/Index.cfm)
49+
- ripristinato supporto legenda tramite features.legend
50+
- fix titoli assi
51+
52+
v2.0.6
53+
- supporto per "template", che permette di specificare quale configurazione di default utilizzare (permette quindi di avere dei "template" di configurazioni)
54+
WARN: $.elysia_charts.default_options e' stato rinominato in $.elysia_charts.templates (mantenuta compatibilita' all'indietro)
55+
- aggiunte le opzioni startAngle e clockwise a grafico "pie" per definire l'angolo iniziale e l'orientamento delle fette
56+
- semplificato serie.stackedWith: ora si chiama solo "stacked" (tenuta compatibilita' all'indietro) ed e' possibile specificare solo "true" per impilare automaticamente con la precedente serie visibile
57+
- supporto di serie.labelsAnchor anche per assi l ed r (in modo da poter specificare l'allineamento delle label dell'asse)
58+
- supporto di serie.labelsFormatHandler per specificare una funzione di formattazione delle label (sia per assi l,r che per asse x)
59+
- supporto migliore axis.labelsRotate con valori negativi
60+
- gestione corretta visible=true|false in cambiamenti grafici e per gestione stackedWith
61+
- cambiamento z-index di balloon e label per renderli selezionabili
62+
- impostato { cursor : "default" } in defaultSeries.label.style e tolto da opzioni forzate
63+
- bugfix (major): risolte problematiche in interruzione di animazioni (che provocava problemi in caso di interazione col grafico in vari momenti: animazione iniziale, animazioni intermedie, highlight...)
64+
- bugfix: frameAnchor non funzionava correttamente
65+
- bugfix: frame tooltip spariva dopo un cambiamento di grafico
66+
- bugfix: Indexhighlight:bar con mousearea.type=index non funziona
67+
68+
v2.0.7
69+
- nuova gestione grid. Spostate le impostazioni in opt.features.grid (lasciata compatibilita' con vecchie opzioni),
70+
nuove opzioni grid.draw (per nascondere le linee orizzontali e/o verticali), migliorato supporto forceBorder
71+
nuova opzione grid.ticks.* per supportare le barrette sugli assi
72+
- bugfix pie
73+
- aggiunto startAnimation.type = 'grow' e 'grow2' per barline
74+
- fix animation.grow
75+
76+
v2.0.8
77+
- nuova gestione del axis.normalize: ora basato sul numero di cifre significative, i vecchi valori "auto" e "autony" vengono entrambi tradotti con "2"
78+
- aggiunto startAnimation.subType usato da alcune animazioni. Supportato subType = 0,1,2 per animation.grow (subType = 2 sostituisce type = grow2)
79+
- aggiunta opzione features.debug.active per attivare debug
80+
- bugfix nomi serie con maiuscole
81+
- bugfix animazioni con serie non visibili
82+
- bugfix divisione per zero in barline
83+
- bugfix label.frameAnchor top|bottom invertiti
84+
85+
v2.0.9
86+
- bugfix in normalizzazione configurazioni passate
87+
- modificato valore di default di indexHighlightProps
88+
- migliorata gestione positionHandler per tooltip, in modo da gestire la posizione del mouse anche su IE
89+
- fix posizionamento label su IE (che da problemi con impostazioni opacità, e prima impostava opacity: 1 anche se non ce n'era bisogno)
90+
91+
v2.0.10
92+
- WARN: necessita di aggiornamento a Raphael1.5
93+
- supporto transizioni di configurazione per pie
94+
- supporto pie con serie multiple
95+
- supporto per series.highlight.restoreSpeed e restoreEasing
96+
- supporto per tooltip.width="auto" (= 0) e tooltip.height="auto" (= 0) - Disabilita automaticamente frame SVG
97+
- refactoring gestione slice/archi, con gestione corretta animazione (necessita' feature "customAttribute" di Raphael1.5)
98+
- fix funnel senza dati o con dati tutti 0
99+
- fix transizioni in labelmanager e highlightmanager
100+
101+
v2.1.0
102+
- RENAME da elysia_charts a elycharts
103+
- fix hightlight.move
104+
- supporto per serie.anchor.userMouseEnter
105+
- fix transizioni da serie (e parti di serie) non renderizzate
106+
- line chart: cambiato supporto per linee arrotondate
107+
108+
v2.1.1
109+
- fix errore rendering
110+
- fix highlight con path nascosti

docs/demo.html

+204
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
<html>
2+
<head>
3+
<script src="../lib/DP_Debug.js" type="text/javascript" charset="utf-8"></script>
4+
<script src="../lib/jquery.js" type="text/javascript" charset="utf-8"></script>
5+
<script src="../lib/raphael.js" type="text/javascript" charset="utf-8"></script>
6+
7+
<script src="../src/elycharts_core.js" type="text/javascript" charset="utf-8"></script>
8+
<script src="../src/elycharts_manager_anchor.js" type="text/javascript" charset="utf-8"></script>
9+
<script src="../src/elycharts_manager_animation.js" type="text/javascript" charset="utf-8"></script>
10+
<script src="../src/elycharts_manager_balloon.js" type="text/javascript" charset="utf-8"></script>
11+
<script src="../src/elycharts_manager_highlight.js" type="text/javascript" charset="utf-8"></script>
12+
<script src="../src/elycharts_manager_label.js" type="text/javascript" charset="utf-8"></script>
13+
<script src="../src/elycharts_manager_legend.js" type="text/javascript" charset="utf-8"></script>
14+
<script src="../src/elycharts_manager_mouse.js" type="text/javascript" charset="utf-8"></script>
15+
<script src="../src/elycharts_manager_shadow.js" type="text/javascript" charset="utf-8"></script>
16+
<script src="../src/elycharts_manager_tooltip.js" type="text/javascript" charset="utf-8"></script>
17+
<script src="../src/elycharts_chart_barline.js" type="text/javascript" charset="utf-8"></script>
18+
<script src="../src/elycharts_chart_funnel.js" type="text/javascript" charset="utf-8"></script>
19+
<script src="../src/elycharts_chart_line.js" type="text/javascript" charset="utf-8"></script>
20+
<script src="../src/elycharts_chart_pie.js" type="text/javascript" charset="utf-8"></script>
21+
<script src="../src/elycharts_defaults.js" type="text/javascript" charset="utf-8"></script>
22+
23+
<script>
24+
$(document).ready(function(){
25+
var values = [Math.random() * 100,Math.random() * 100,Math.random() * 100];
26+
//values[2] = values[1] * Math.random();
27+
28+
//values = [1000, 5];
29+
30+
var tooltips = ['tip1','tip2','tip3'];
31+
$("#holder1").chart({
32+
type : 'pie', values : values, tooltips : tooltips,
33+
labels : ['lab1','lab2','lab3'],
34+
legend : ['legenda un bel po lunga','leg2','leg3'],
35+
defaultSeries : {
36+
//sectorOnMouseOver : function(element, env, i, props) { element.animate({scale: [1.1, 1.1, env.opt.cx, env.opt.cy]}, 500, ">"); },
37+
//sectorOnMouseOut : function(element, env, i, props) { element.animate({scale: [1, 1, env.opt.cx, env.opt.cy]}, 500, ">"); },
38+
//tooltipProps : { highlightTarget : 0 },
39+
plotProps : { opacity : .6 },
40+
label : { active : true },
41+
highlight : { scale : [ 1.1, 1] }
42+
//labelShowOnMouseOver : 1
43+
},
44+
series : { root : { values : [
45+
{ color : 'red' },
46+
{ color : 'green' },
47+
{ color : 'blue' },
48+
] }},
49+
features : {
50+
legend : {
51+
x : 10, y : 10, width : 100, height : 100,
52+
defaultDotProps : { type : 'rect', r : 5}
53+
}
54+
}
55+
});
56+
57+
$("#holder5").chart({
58+
type : 'pie',
59+
interactive : false,
60+
values : { root : values }, tooltips : { root : tooltips },
61+
labels : ['lab1','lab2','lab3'],
62+
defaultSeries : {
63+
plotProps : { stroke : 'white', "stroke-width" : .5, "fill-opacity" : 1 }
64+
},
65+
series : { root : { values : [
66+
{ color : 'red', plotProps : { fill : 'red' } }, // TODO: color: red non va
67+
{ color : 'green', plotProps : { fill : 'green' } },
68+
{ color : 'blue', plotProps : { fill : 'blue' } },
69+
] }},
70+
features : {
71+
shadow : {
72+
offset : [1.5, 1.5] // Per attivare l'ombra, [y, x]
73+
}
74+
}
75+
});
76+
77+
var labels = [], data = [[], [], [], []], tooltips = [[], [], [], []];
78+
for (var i = 0; i < 10; i++) {
79+
labels[i] = 'L' + i;
80+
for (var j = 0; j < 4; j++) {
81+
data[j][i] = Math.round(Math.random() * 100);
82+
tooltips[j][i] = labels[i] + ' = ' + data[j][i];
83+
}
84+
}
85+
86+
$("#holder2").chart({ type : 'line', labels : labels, values : data, tooltips : tooltips,
87+
legend : ['serie 1', 'serie 2', 'serie 3', 'serie 4'],
88+
margins: [10,30,65,30],
89+
//gridNX : 10,
90+
defaultSeries : {
91+
lineCenter : 1,
92+
barWidthPerc : 75
93+
},
94+
series : [
95+
{type : 'bar', axis : 'r', color : 'blue'},
96+
{type : 'bar', axis : 'r', color : 'green', stackedWith : 0 },
97+
{type : 'bar', axis : 'l' , color : 'red'},
98+
{type : 'line', axis : 'l', color : 'gray', plotProps : { "stroke-width" : 2 } }
99+
],
100+
barMargins : 10,
101+
labelsCenter : 1,
102+
defaultAxis : {labels: 1, labelsDistance: 4, labelsRotate: 90},
103+
axis : {
104+
x : {title : 'Axis X', titleDistance: 25 },
105+
l : {title : 'Axis L', titleDistance: 25 },
106+
r : {title : 'Axis R', titleDistance: 25 }
107+
},
108+
features : {
109+
legend : { horizontal : true, itemWidth : "auto", x : "auto", width : "auto", y : 370, height : 28 }
110+
}
111+
});
112+
113+
/*
114+
var labels = [
115+
0, // Si vede
116+
'label molto lunga 1',
117+
false, false,
118+
'label molto lunga 2',
119+
0, // Non si vede (coperto da quello sopra)
120+
false,
121+
'label molto lunga 3', // Non si vede (sborda a destra)
122+
0, // Si vede
123+
1 // NON Si vede (sborda... per forza)
124+
];
125+
getChartCanvas("holder3").lineChart(labels, data, tooltips, {
126+
margins: [10,30,65,30],
127+
//gridNX : 10,
128+
defaultPlotProps : {
129+
barProps : { "width-perc" : 80 }
130+
},
131+
plotProps : [
132+
{type : 'bar', axis : 'r', color : 'blue'},
133+
{type : 'bar', axis : 'r', color : 'green', stackedWith : 0 },
134+
{type : 'line', axis : 'l' , color : 'red', behind : 0, fillProps : {opacity : 1} },
135+
{type : 'line', axis : 'l', color : 'gray', stackedWith : 2 }
136+
],
137+
barMargins : 10,
138+
defaultAxisProps : { labelsAnchor : "start", labelsHideCovered : 1, labelsMargin : 2, normalize: 'autony' },
139+
gridExtra : [0, 0, 14, 0]
140+
});
141+
142+
getChartCanvas("holder6").lineChart(labels, data, tooltips, {
143+
margins: [10,30,65,30],
144+
//gridNX : 10,
145+
defaultPlotProps : {
146+
barProps : { "width-perc" : 75, "fill-opacity" : 1 }
147+
},
148+
plotProps : [
149+
{type : 'bar', axis : 'r', color : 'blue'},
150+
{type : 'bar', axis : 'r', color : 'green', stackedWith : 0 },
151+
{type : 'bar', axis : 'l' , color : 'red' },
152+
{type : 'bar', axis : 'l', color : 'gray', stackedWith : 2 }
153+
],
154+
barMargins : 10,
155+
defaultAxisProps : { labelsHideCovered : 1, labelsMargin : 2, normalize: 'auto', labelsSkip: 0 },
156+
shadowOffset : [ 2, 2]
157+
});
158+
159+
getChartCanvas("holder4").lineChart( labels, data, tooltips, {
160+
margins: [0,0,0,0],
161+
gridNX: 0, gridNY: 0,
162+
defaultPlotProps: { rounded: 1, dotProps: false, tooltipProps: false, lineProps : {"stroke-width": 1} }
163+
});
164+
*/
165+
166+
});
167+
</script>
168+
169+
<style type="text/css" media="screen">
170+
body {
171+
color: black;
172+
}
173+
#holder1, #holder2, #holder3, #holder6 {
174+
float: left;
175+
height: 400px;
176+
width: 400px;
177+
background-color: #F0F0F0;
178+
}
179+
#holder4 {
180+
float: left;
181+
height: 20px;
182+
width: 100px;
183+
}
184+
#holder5 {
185+
float: left;
186+
height: 100px;
187+
width: 100px;
188+
}
189+
</style>
190+
191+
</head>
192+
<body>
193+
<br />
194+
<div id="holder1"></div>
195+
<div id="holder2"></div>
196+
<div id="t" style="clear:both"></div>
197+
<div id="holder3"></div>
198+
<div id="holder6"></div>
199+
<div id="t" style="clear:both"></div>
200+
<div id="holder5"></div>
201+
<div id="holder4"></div>
202+
<div id="log" style="clear:both"></div>
203+
</body>
204+
</html>

0 commit comments

Comments
 (0)