Time series II: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 22: | Line 22: | ||
['3.2.2009',3810] | ['3.2.2009',3810] | ||
]; | ]; | ||
var googleStyleChart = function(board, x, y) { | |||
var points = [], i, p; | |||
points.push(brd2.createElement('point', [0,85], {visible:false, name:'', fixed:true, withLabel:false})); | |||
for (i=0;i<x.length;i++) { | |||
p = board.create('point', [x[i],y[i]], | |||
{strokeWidth:2, strokeColor:'#ffffff', | |||
highlightStrokeColor:'#0077cc', fillColor:'#0077cc', | |||
highlightFillColor:'#0077cc', style:6, name:'', fixed:true}); | |||
points.push(p); | |||
} | |||
points.push(board.create('point', [x[x.length-1],2700], {visible:false, name:'', fixed:true})); | |||
// Filled area. We need two additional points [start,0] and [end,0] | |||
board.create('polygon',points, {withLines:false,fillColor:'#e6f2fa',withLabel:false}); | |||
// Curve: | |||
board.create('curve', [x,y], | |||
{strokeWidth:3, strokeColor:'#0077cc', | |||
highlightStrokeColor:'#0077cc'} | |||
); | |||
}; | |||
var i, x = [], y = [], | var i, x = [], y = [], | ||
birthday = toDate(table[0][0]); | birthday = toDate(table[0][0]); | ||
Line 29: | Line 52: | ||
y[i] = table[i][1]*1; | y[i] = table[i][1]*1; | ||
} | } | ||
googleStyleChart(brd,x,y); | |||
</jsxgraph> | </jsxgraph> |
Revision as of 16:58, 3 February 2010
The weight of Antonia Wassermann