Different chart styles: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 22: | Line 22: | ||
function lineChart() { | function lineChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 32: | Line 32: | ||
function splineChart() { | function splineChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 43: | Line 43: | ||
function barChart() { | function barChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 55: | Line 55: | ||
function multiStyleChart() { | function multiStyleChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 66: | Line 66: | ||
function twoBarCharts() { | function twoBarCharts() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 78: | Line 78: | ||
function horizontalBarChart() { | function horizontalBarChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 500, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 89: | Line 89: | ||
function dynamicBarChart() { | function dynamicBarChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 450, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | var b1axisx = board.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 106: | Line 106: | ||
function pieChart() { | function pieChart() { | ||
JXG.JSXGraph.freeBoard(board); | JXG.JSXGraph.freeBoard(board); | ||
board = JXG.JSXGraph.initBoard('jxgbox', {originX: | board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 450, unitX: 50, unitY: 50}); | ||
board.suspendUpdate(); | board.suspendUpdate(); | ||
var a = board.createElement('chart', dataArr, | var a = board.createElement('chart', dataArr, |
Revision as of 18:06, 5 December 2008