Skip to content

Commit

Permalink
Built examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
cesutherland committed Feb 2, 2012
1 parent 7ae2f93 commit e864571
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions flotr2.examples.types.js
Expand Up @@ -572,7 +572,8 @@ function mouse_zoom (container) {
}

options = {
selection : { mode : 'x', fps : 30 }
selection : { mode : 'x', fps : 30 },
title : 'Mouse Zoom'
};

// Draw graph with default options, overwriting with passed options
Expand Down Expand Up @@ -636,7 +637,8 @@ function mouse_drag (container) {
}

options = {
xaxis: {min: 0, max: 20}
xaxis: {min: 0, max: 20},
title : 'Mouse Drag'
};

// Draw graph with default options, overwriting with passed options
Expand Down Expand Up @@ -668,7 +670,10 @@ function mouse_drag (container) {
offset = start.x - end.x;

graph = drawGraph({
xaxis : { min : xaxis.min + offset, max : xaxis.max + offset }
xaxis : {
min : xaxis.min + offset,
max : xaxis.max + offset
},
});
// @todo: refector initEvents in order not to remove other observed events
Flotr.EventAdapter.observe(graph.overlay, 'mousedown', initializeDrag);
Expand All @@ -689,7 +694,8 @@ function mouse_drag (container) {
Flotr.ExampleList.add({
key : 'basic-time',
name : 'Basic Time',
callback : basic_time
callback : basic_time,
description : "<p>Select an area of the graph to zoom. Click to reset the chart.</p>"
});

function basic_time (container) {
Expand All @@ -714,7 +720,8 @@ function basic_time (container) {
selection : {
mode : 'x'
},
HtmlText : false
HtmlText : false,
title : 'Time'
};

// Draw graph with default options, overwriting with passed options
Expand Down Expand Up @@ -804,7 +811,8 @@ function negative_values (container) {
{ data : d2, label : 'y = ' + alpha.toFixed(2) + ' + ' + beta.toFixed(2) + '*x' } // Regression
],
{
legend : { position : 'se', backgroundColor : '#D2E8FF' }
legend : { position : 'se', backgroundColor : '#D2E8FF' },
title : 'Negative Values'
}
);
};
Expand All @@ -831,7 +839,8 @@ function click_example (container) {
yaxis: {min: 0, max: 15},
lines: {show: true},
points: {show: true},
mouse: {track:true}
mouse: {track:true},
title: 'Click Example'
};

graph = Flotr.draw(container, [d1], options);
Expand Down

0 comments on commit e864571

Please sign in to comment.