Git Product home page Git Product logo

flotr's People

Contributors

baswenneker avatar cesutherland avatar phenx avatar

Watchers

 avatar

flotr's Issues

Error when try to put two or more points together

when send two or more lines with show points:true occurs and error.
I fix this error changing these lines:
function plotPoints(data, radius, fill) {
    for(var i = 0; i < data.length; ++i){
            var x = data[i][0], y = data[i][1];             
                if(x < xaxis.min || x > xaxis.max || y < yaxis.min || y >
yaxis.max)continue;
        ctx.beginPath();
        ctx.arc(tHoz(x), tVert(y), radius, 0, 2 * Math.PI, true);
        if(fill) ctx.fill();
        ctx.stroke();
    }
}
function plotPointShadows(data, offset, radius){
    for(var i = 0; i < data.length; ++i){
        var x = data[i][0], y = data[i][1];
        if (x < xaxis.min || x > xaxis.max || y < yaxis.min || y >
yaxis.max)continue;
        ctx.beginPath();
        ctx.arc(tHoz(x), tVert(y) + offset, radius, 0, Math.PI, false);
        ctx.stroke();
    }
}

for:

function plotPoints(data, radius, fill) {
    var x=null,y=null;
    for(var i = 0; i < data.length; ++i){
        if(x==null && data[i][0]==x && data[i][1]==y)continue
        else{
                x = data[i][0], y = data[i][1];
                if(x < xaxis.min || x > xaxis.max || y < yaxis.min || y >
yaxis.max)continue;
                ctx.beginPath();
                ctx.arc(tHoz(x), tVert(y), radius, 0, 2 * Math.PI, true);
                        if(fill) ctx.fill();
                ctx.stroke();
        }
    }
}
function plotPointShadows(data, offset, radius){
    var x=null,y=null;
        for(var i = 0; i < data.length; ++i){
        if(x==null && data[i][0]==x && data[i][1]==y)continue
                else{
                var x = data[i][0], y = data[i][1];
                if (x < xaxis.min || x > xaxis.max || y < yaxis.min || y >
yaxis.max)continue;
                ctx.beginPath();
                ctx.arc(tHoz(x), tVert(y) + offset, radius, 0, Math.PI, false);
                        ctx.stroke();
               }
    }
}

Ruben Buron.

Original issue reported on code.google.com by [email protected] on 4 Apr 2008 at 9:50

Flotr breaks when interacting with programs that will augment Object.prototype

What steps will reproduce the problem?
1. Problem seen in IE using Prototype, Flotr and RSH/json2007.js
(http://code.google.com/p/reallysimplehistory/)
2. json2007.js augments Object.prototype to get around Protoype JSON issues
with handling long values (for IE)
3. Using json2007.js and Flotr side by side breaks almost all Prototype
functions in Flotr

What is the expected output? What do you see instead?
Most likely not in the Flotr code itself. Probably in included libraries
for IE. No output at all. Even Element.insert() breaks and no elements get
added to the DOM.

What version of the product are you using? On what operating system?
Flotr r90

Please provide any additional information below.
See http://yuiblog.com/blog/2006/09/26/for-in-intrigue/ for a possible
explanation for this problem

I am not sure it this would be an issue for you or for the excanvas team,
because I do not know where exactly the code breaks (sorry). Just thought
you should be aware of it. And if you can come up with a solution that
would be great.

(BTW, great plotting code you have created here. Keep up the good work.)

Original issue reported on code.google.com by [email protected] on 8 Feb 2009 at 1:30

mouse lineColor is documented incorrectly

The Flotr documentation for mouse interaction
<http://solutoire.com/flotr/docs/mouse/> incorrectly states that the
mouse.color property controls the color displayed when hovering over a data
point. It is actually the mouse.lineColor property.

What version of the product are you using? On what operating system?
0.2.0-alpha

Original issue reported on code.google.com by [email protected] on 25 Feb 2009 at 8:55

Enhancement - show values in legend

Would be nice to have a method to show values on hover in the legend
itself, and also the ability to place the legend outside the graph.

I know I can watch mousemove event, and do stuff, but I dont have a handle
into the legend, to place values in the legend.

Just a nice to have feature - and I believe should be easy to implement

Thanks!
-Jeetu

Original issue reported on code.google.com by [email protected] on 14 Feb 2009 at 12:39

Crosshair overwrites the selection box

I was just playing around with your new crosshair feature and found that if
you have made a selection on the plot and then move the crosshair over that
box then it "cuts" slices out of the box. It looks like its because its
sharing the graphics context with the selection box. The selection should
probably be moved to its own context that lives one level below the mouse
layer. Looks good though. Would you be intrested in a patch that displayed
the current position when in crosshair mode?

Original issue reported on code.google.com by [email protected] on 7 Feb 2009 at 5:51

Mousetrack Popup Over Whole Bar in Stacked Bar Charts

What steps will reproduce the problem?
1.Mouse over bar in a stacked bar chart
2.
3.

What is the expected output? What do you see instead?
The mousetrack works on the actual data point. As expected.

What version of the product are you using? On what operating system?
N/A

Please provide any additional information below.
Is it possible to have a mousetrack popup when the mouse is over any part
of a rectangular area (bar) in a stacked bar chart? Instead of using the
data points.

Original issue reported on code.google.com by [email protected] on 31 Mar 2009 at 10:47

Error when Flotr.draw

What steps will reproduce the problem?
1. <div id="mainpanel_1_panel_source/2/2/25_portlet_1_chart" style="width:
75px; height: 100px; position: relative; cursor: default;">
2. var pie =
Flotr.draw($('mainpanel_1_panel_source/2/2/25_portlet_1_chart'),[ [0, 0],
[1, 2], [2, 4], [3, 6], [4, 8] ]);
3. An invalid or illegal string was specified" code: "12

What is the expected output? What do you see instead?

Firebug give me this canvas, created inner the div:
<canvas width="75" height="100"/>
<canvas width="75" height="100" style="position: absolute; left: 0px; top:
0px;"/>
<div style="font-size: smaller; color: rgb(84, 84, 84);"/>

and the error is:
An invalid or illegal string was specified" code: "12

What version of the product are you using? On what operating system?
I am developing with extjs, prototype 1.6.0.2, ext-prototype-adapter.js, 
firefox 2.0.0.13

Please provide any additional information below.
I dont know what is the Problem because i dont have any additional information 

Original issue reported on code.google.com by [email protected] on 27 Mar 2008 at 12:14

Patch implementing centered bars in bar graphs

While implementing a benchmarking module for one of our customers I was in
need of having bar charts where the bars are not drawn on the right side of
the corresponding x axis value but have them centered to their value.

A patch is attached against which introduces a new option "center" to the
bars options. Setting this option to true renders the bars centered to
their value.

The patch also contains an example derived from basic-bar.html.

Please consider applying this patch becaus bars which are centerd to their
value with an additional padding left and right of the bar series looks
more like bar chars use to look.

Original issue reported on code.google.com by [email protected] on 10 Mar 2009 at 11:31

Attachments:

'w' legend position problem

What steps will reproduce the problem?
1. use 'w' legend position, 
2.
3.

What is the expected output? What do you see instead?
Legend is positioned incorrectly - it uses bottom offset for left offset.

What version of the product are you using? On what operating system?
0.1.0alpha on Windows XP, Linux

Please provide any additional information below.
Problem is in javascipt code. Attached patch for debug version, for the
release(compressed) version fix is similar.


Original issue reported on code.google.com by [email protected] on 17 Jun 2008 at 8:28

Attachments:

this.mt has no properties (r57)

In r57, when activating track mouse support, (as Mouse track Example),
firebug gives an error saying: this.mt has no properties.

The error is at line 2413 of r57.

Instead of : 
   this.mt.fire('flotr:hit', [n, this]);

it should be 
   mt.fire('flotr:hit', [n, this]);


Regards
albert

Original issue reported on code.google.com by [email protected] on 6 Dec 2008 at 5:52

Trying to save page as html and try to view in Excel sheet

What steps will reproduce the problem?
1.Trying to save page as htm or html
2.Try to view in Excel sheet


What is the expected output? What do you see instead?
To see the full image

What version of the product are you using? On what operating system?
1.2 and windows xp with IE

Please provide any additional information below.
When i see the output on excel it showing me a very tiny image... is it
possible to show the image in excel file

Original issue reported on code.google.com by [email protected] on 19 Mar 2009 at 1:26

Error in IE7 - flotr.js, line 426


Line:  this.canvas = el.select('.flotr-canvas')[0]
Error: Object does not support this property or method

The graph does not render.

I am using flotr from svn trunk


Original issue reported on code.google.com by [email protected] on 24 Dec 2008 at 11:00

Logarithmic scale

I'm working with a very large range of numbers on a bar chart. Sometimes
bars are scaled so small that they are not visible because another bar's
value is so large. Could we have an option for a logarithmic scale for the
y-axis?

Original issue reported on code.google.com by [email protected] on 24 Nov 2008 at 6:18

Is it possible to add null on data value

Is it possible to add null on data values

examples: var d3 =[ [10,0],[30,0],null,[50,2],[70,10], null,
[90,21],[110,34], null, [130,51],[150,65],[170,79],[190,97]];

Please let me know if possible

Regards,
-Ranga

Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 2:45

flotr broken in chrome?

What steps will reproduce the problem?
1. trying to open a flotr graph in google chrome

What is the expected output? What do you see instead?
A graph is expected, but chrome shows nothing (blank div)

What version of the product are you using? On what operating system?
win XP sp2
chrome 0.3.154.9
flotr 0.1.0alpha

Please provide any additional information below.
javascript console message:
Uncaught TypeError: Cannot call method 'next' of undefined
http://127.0.0.1/CWP/js/flotr2.js (line 1489)

Original issue reported on code.google.com by [email protected] on 13 Nov 2008 at 3:27

setSelection is broken in 0.2.0-alpha

What steps will reproduce the problem?
1. Using the Mouse Zoom example.
2. f.setSelection({x1: 1, x2: 5});


What is the expected output? What do you see instead?
A selection x1: 1 to x2: 5.  No selection is displayed.  

What version of the product are you using? On what operating system?
0.2.0-alpha, OS X.

Please provide any additional information below.

--- flotr.debug-0.2.0-alpha.orig.js 2009-01-28 15:26:14.000000000 -0500
+++ flotr.debug-0.2.0-alpha.js  2009-01-28 15:26:21.000000000 -0500
@@ -2701,8 +2701,8 @@
        var options = this.options,
            xa = this.axes.x,
            ya = this.axes.y,
-           vertScale = yaxis.scale,
-           hozScale = xaxis.scale,
+           vertScale = ya.scale,
+           hozScale = xa.scale,
            selX = options.selection.mode.indexOf('x') != -1,
            selY = options.selection.mode.indexOf('y') != -1;




Original issue reported on code.google.com by [email protected] on 28 Jan 2009 at 8:42

Missing legend color when printing

What steps will reproduce the problem?
1. Open a web page with a flotr chart including a legend under firefox
2. Click on File->print, print to file in pdf
3. look at the pdf file, legend colors are missing

What is the expected output? What do you see instead?

See colors for legend labels

What version of the product are you using? On what operating system?

default examples on the flotr homepage

Please provide any additional information below.

Same result with print preview

Original issue reported on code.google.com by [email protected] on 14 Mar 2008 at 2:47

Attachments:

Allow zooming with overview

Like here :
http://people.iola.dk/olau/flot/examples/zooming.html

It needs a second container, and draw the same Graph, but smaller size. It
shouldn't be difficult.

Original issue reported on code.google.com by fabien.menager on 17 Nov 2008 at 10:26

Error in Canvas2Image on IE6

In IE6, using Canvas2Image gives an error of method or property not allowed.

This is produced by the first check on canvas support:

    var oCanvas = document.createElement("canvas");

    // no canvas, bail out.
    if (!oCanvas.getContext("2d")) {  <====ERROR
.................................
    }

changing to 

    var oCanvas = document.createElement("canvas");

    // no canvas, bail out.
    if (!oCanvas.getContext || !oCanvas.getContext("2d")) {
.................................
    }

removes the error.

Regards
albert

Original issue reported on code.google.com by [email protected] on 26 Dec 2008 at 9:01

IE6 Error for Diacritics Definition in Canvastext

What steps will reproduce the problem?
1. Use Flotr revision 91 in IE6
2.
3.

What is the expected output? What do you see instead?
Javascript error for canvastext.js
Issue with the added diacritics to the letters definitions (line 110 onwards)
Error: "Line: 110, Char: 20, Error: Expected ':', Code: 0"

What version of the product are you using? On what operating system?
Flotr revision 91 in IE6

Please provide any additional information below.
Only in IE6, works fine in IE7

Original issue reported on code.google.com by [email protected] on 1 Mar 2009 at 10:59

Try to make image export work on Safari

Try to make image export work on Safari (already tried on Chrome, it seems
compromised). Only PNG works on Opera, it probably never will on IE, and
fully works on Firefox.

Original issue reported on code.google.com by fabien.menager on 17 Nov 2008 at 10:24

Pie Chart does not work in Webkit browsers

What steps will reproduce the problem?

1. Open a Webkit-based browser: Chrome, Windows Safari, Mac Safari
2. Go to the playground at http://phenxdesign.net/projects/flotr/playground/
Click Pie Chart > Show > Show
3. Or open the example file basic-pie.html

What is the expected output? 
  The pie chart as in FF, IE or Opera

What do you see instead?
  The labels, the legend but no pie

What version of the product are you using? On what operating system?
  v = 0.2.0 (also tried latest revisions)
  os = Windows XP and Mac OS X Leopard




Original issue reported on code.google.com by [email protected] on 5 Feb 2009 at 7:25

Mouse over does not work for large values in the y-axis

For large ranges in the y-axis, mouse tracking does not work.  Instead of 
getting a red point and 
the value display, nothing happens (tested in Firefox 2 and 3).  This appears 
to only occur when 
there is a large difference between the maximum and minimum values on the 
y-axis.

The graph draw by this code works:
Flotr.draw( $(id), [[[1, 100],[2, 102],[3, 104]]], { mouse: { track: true}});

The graph drawn by this code does not:
Flotr.draw( $(id), [[[1, 100000000],[2, 110000000],[3, 120000000]]], { mouse: { 
track: true}});

Original issue reported on code.google.com by [email protected] on 2 Jul 2008 at 9:37

Minor bug while mouse tracking on zoomed map

What steps will reproduce the problem?
1. Create a simple scatter plot
2. Zoom in on a section that will place points just below the selection area
3. On zoomed map, if you drag mouse across bottom, the tracking function
will sometimes show points outside the axes.

What is the expected output? What do you see instead?
It should ignore points outside the axes.

What version of the product are you using? On what operating system?
0.2.0 alpha, Firefox 3.05

Hit function should be modified on line 2846:

if (data[j][1] === null || this.axes.x.min > data[j][0] || this.axes.x.max
< data[j][0] || this.axes.y.min > data[j][1] || this.axes.y.max <
data[j][1]) continue;

Original issue reported on code.google.com by [email protected] on 13 Jan 2009 at 5:20

The new Flotr playground/configurator

I've just made a Flotr configurator, it allows to configure almost
everything on Flotr, some stuff is missing for now, but will be added in
the near future. It will probably show us many bugs, because that's it's
first goal !

http://phenxdesign.net/projects/flotr/examples/prototype/playground.html

Have fun !

(and don't forget to report any bug you find, whether it is on the
playground or Flotr)

Original issue reported on code.google.com by fabien.menager on 15 Jan 2009 at 12:03

About Flotr's modularity

Bas and me think that Flotr should be splitted into modules. I've thought
about it a little and think it should be splitted like that : 
* core - Flotr
* graph - Flotr.Graph
* color - Flotr.Color
* events - Flotr.Events or Behaviour - Mouse events, map areas...
* date - Flotr.Date
* text - Canvas.Text
* export - Flotr.Export
*    image - Flotr.Export.Image
*    csv - Flotr.Export.Data
* tabulations - Flotr.Tabs
* spreadsheet - Flotr.Spreadsheet
* portability - Canvas.Portability?
*    ie (excanvas)
*    others ?

Original issue reported on code.google.com by fabien.menager on 28 Nov 2008 at 9:58

Candle chart support

I created some initial support for candle charts widely used in stock
trading contexts. Attached is a patch that adds a new chart type 'candles'

Original issue reported on code.google.com by [email protected] on 26 Dec 2008 at 5:56

Attachments:

Labelling the axes? [Newbie question or enhancement request]

Forgive me if I have not looked closely enough at the documentation.

Is it possible to add a label to the x & y axes?  If yes how?
I know that I can position a div tag outside of the image but this won't
get included if someone copies the image to a different application.

If no, can you make this an enhancement request?

TIA

Al

Original issue reported on code.google.com by al.caughey on 22 Aug 2008 at 3:14

Relative mouse tracking broken for y2axis

What steps will reproduce the problem?
1. add 2 series, one on yaxis, and other on y2axis. They must have
different scales (eg - s1: 10 - 100 and s2: 1000: 500000) 
2. enable mouse tracking (sw, relative)
3. Observe mouse tracker displayed at varying distances outside the graph,
on the top for y2axis.

What version of the product are you using? On what operating system?
/* $Id: flotr.js 95 2009-02-12 20:20:05Z fabien.menager $ */
 * @version 0.2.0

Original issue reported on code.google.com by [email protected] on 2 Apr 2009 at 1:17

On Print preview - Displays canvas style

What steps will reproduce the problem?
1. On IE click print preview
2. On the background displays Canvas style position

What is the expected output? What do you see instead?
To undisplay the Canvas style position...

What version of the product are you using? On what operating system?
Windows xp and 2.0

Please provide any additional information below.
Please find attached print.jpg 

Kindly let me ASAP 

Thanks in Advance

Original issue reported on code.google.com by [email protected] on 12 Feb 2009 at 4:38

Attachments:

Minor bug in hit function when two neighboring points have same x or y value

What steps will reproduce the problem?
1. Generate a scatter plot with two neighboring points that either have
same x or y value.
2. Place mouse over first point, tracker box appears.
3. Move mouse to second point, trackFormatter function is not called.

What is the expected output? What do you see instead?
Should see the tracker shift to second point, instead remains on first. Bug
was traced to hit function, which required a change in x and y values.

What version of the product are you using? On what operating system?
r80

Line 2853 should be:

if(n.mouse && n.mouse.track && !prevHit || (prevHit && (n.x != prevHit.x ||
n.y != prevHit.y))){


Original issue reported on code.google.com by [email protected] on 9 Jan 2009 at 7:25

bars do not work on safari 3.2.1

What steps will reproduce the problem?
1.A simple series configured to draw bar graphs


What is the expected output? What do you see instead?
The bars are rendered in partial grey color, with no legend.

What version of the product are you using? On what operating system?
flotr-0_2_0-alpha , macosx

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 16 Apr 2009 at 11:44

Ticks overflow outside the graph on X-Axis

What steps will reproduce the problem?
1. Create a bar graph with ticks specified on xaxis as [0,1,2,3,[4,"Four"]]
2. Have data in the series only for 2,3,4 
3. On plotting, x axis has ticks for 0 and 1 way outside the graph on the
left. See attached screenshot. The Graph start only from the tick "2". )
and 1 are outside the graph area


Using the latest 0.2.0-alpha version
Have not verified this for other graph types or y axis.


Original issue reported on code.google.com by [email protected] on 5 Feb 2009 at 1:15

Attachments:

Using container config option for legend fails

To reproduce:

flotr.draw(data,  {
  legend: {container: $(‘foo’)}
})

bombs for 2 reasons.
When the config options are merged container is a complicated object
that gets recursed into so that its properties get added correctly to
the new config object.  This recursion doesn't work and flotr bombs.

Getting past this (fixing recursive merge method) then sees flotr die
on a no such method error.
Trying to call $('foo').append isn't possible (cruft left over from
Jquery i'm guessing).


To Fix:

In flotr change:

options.legend.container.append(table);
to
$(options.legend.container).update(table);

and just pass in the div id to the container property (not the
object).
(make sure div has hight and width define)

Flotr.draw(data,  {
legend: {container: ‘foo’}
});


btw:

Thanks to  funk-bott  for posting about changing
options.legend.container.append(table);
to
$(options.legend.container).update(table);
on flotr website.

Original issue reported on code.google.com by [email protected] on 28 Oct 2008 at 5:48

Support for the flot date mode

I would like to see xaxis:{mode:'time'} as per flot.

The feature automatically changes the ticks from timestamps to sensibly
formatted dates based on the scale. If the range covers years, it will show
years only, similar for months, days, hours. Allows for very simple zooming.

See "Time series data" in http://flot.googlecode.com/svn/trunk/API.txt

Or the time example: http://people.iola.dk/olau/flot/examples/time.html


Original issue reported on code.google.com by [email protected] on 19 May 2008 at 10:05

Try to save the html and view in excel

What steps will reproduce the problem?
1.Try to as the html file 
2.Trying to view in excel


What is the expected output? What do you see instead?
unable to see the image on excel

What version of the product are you using? On what operating system?
2.0 and windows xp

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Mar 2009 at 1:25

Mouse tracking in one axis

Dear Bas Wenneker

I'm using flotr in a project to show altitude profile charts of GPS tracks
with dinamic efects like track the mouse movement in the chart and
simultaneously mark the corresponding point in a map of the track. To
better achieve this I found that it's better that mouse tracking produce
hits only in the 'x' axis of the chart instead of in both, like at this time.

With only a slight modification of flotr we can achieve this. These are the
affected lines in flotr.debug-0.1.0alpha.js

Insert in 425:
    trackMode: 'xy', // => selects if mouse is tracked in 'x' axis,
                                        'y' axis or 'xy' both axis

Replace 1796 and 1797:

    xsens = (series[i].mouse.trackMode == 'y' ? Number.MAX_VALUE :
                hozScale*series[i].mouse.sensibility);
    ysens = (series[i].mouse.trackMode == 'x' ? Number.MAX_VALUE : 
                vertScale*series[i].mouse.sensibility);

This way, the program works like always but, if you include the trackMode =
'x' or trackMode = 'y' in the mouse options, hits response only to 'x' or
'y' mouse movements.

Hope you consider this a good enhancement to include in next version of
your exceptional program.

Best regards.
Javier Sánchez

Original issue reported on code.google.com by [email protected] on 24 Jul 2008 at 1:09

[PATCH] sensibility of mouse tracking

At floter 0.1.0 alpha, the sensibility of mouse tracking depend on a data
range.
The following is my patch for this issue.

--- flotr.debug-0.1.0alpha.js.orig      2008-09-19 16:41:56.000000000 +0900
+++ flotr.debug-0.1.0alpha.js   2008-09-19 16:43:43.000000000 +0900
@@ -1794,8 +1794,8 @@
                        for(var i = 0, data, xsens, ysens; i <
series.length; i++){
                                if(!series[i].mouse.track) continue;
                                data = series[i].data;
-                               xsens = (hozScale*series[i].mouse.sensibility);
-                               ysens =
(vertScale*series[i].mouse.sensibility);
+                               xsens = series[i].mouse.sensibility;
+                               ysens = series[i].mouse.sensibility;
                                for(var j = 0, xabs, yabs; j < data.length;
j++){
                                        xabs = hozScale*Math.abs(data[j][0]
- mouse.x);
                                        yabs =
vertScale*Math.abs(data[j][1] - mouse.y);

Original issue reported on code.google.com by [email protected] on 19 Sep 2008 at 8:04

Pie chart breaks if the series has more than 5 data points

What steps will reproduce the problem?
1. Create a series with 6 data points
2. invoke Flotr to generate a pie with default options
3. You get a javascript error

What version of the product are you using? On what operating system?
0.2.0-alpha

Please provide any additional information below.
If I add more default values to options.colors (at 239 in debug version),
it works. All other graph types work fine without this change.




Original issue reported on code.google.com by [email protected] on 4 Feb 2009 at 2:11

Y Axis Title angle

What steps will reproduce the problem?
1. check the "Axis Y"
2. set title
3. set axis title angle

What is the expected output? What do you see instead?
The title is put horizontally, the angle is not taken in care.

What version of the product are you using? On what operating system?
Firefox - Kubuntu Linux

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 12 Mar 2009 at 2:28

Pie chart.

Pie chart.

Any chance to have a pie chart?

Original issue reported on code.google.com by [email protected] on 10 Apr 2008 at 7:12

Display the values (of the y axis) on the line points

On the line graph unable to view the y values is there any property to
enable like points:true

What is the expected output? What do you see instead?
on the line points to display y values

What version of the product are you using? On what operating system?
latest version on the download page

Please let me know do we have any fix for that...

Thanks

Original issue reported on code.google.com by [email protected] on 7 Nov 2008 at 4:44

Memory Leak when plot is redrawn periodically (PrototypeJS)

My goal was to redraw a plot from data polled from a server, giving the 
appearance of a live-
updating chart. I maintained a variable to contain the data, then on each 
interval, pushed new 
data onto the array and redrew the plot (BTW, this is visually very appealing, 
with the plot 
redrawing smoothly - very nice!). 

I noticed that the browser's real memory use was growing in time with each 
redraw. At first I 
assumed it was my growing data array, but the increase was too large to be 
explained by a pair 
of numbers and the size of the array was capped at 1000 elements.

I created an isolated test case and proved that the memory increase occurs with 
each redraw 
regardless of new data. 

What steps will reproduce the problem? (See attached test case)
1. Load page with initial flotr plot, open a process monitoring tool and view 
browser mem use
2. Redraw chart (in test case, by clicking button)
3. Note memory use.
4. It may take four to six redraws before problem becomes apparent, but once it 
manifests, it is 
consistent.
5. Periodically click 'Redraw Only' button and note that memory use increases 
in response to each 
click.

What is the expected output? What do you see instead?
The expected result is that memory use would increase to a stable level and 
remain flat for each 
subsequent redraw. Actual result is that memory is consumed until browser fails.

For Safari and Firefox under OS X the memory consumed with each redraw is very 
consistent, 
about 2 mb each time. For my real application, broswer failure occurs very 
consistently.

Under Windows and IE, the memory consumed was less for each redraw, the 
increase  for each 
redraw ranged from 36k to 156k 


What version of the product are you using? On what operating system?
flotr-0.1-alpha with prototype-1.6.0.2
 Reproduced on Mac OSX under Firefox and Safari
 Reproduced on Windows XP under Internet Explorer

Original issue reported on code.google.com by [email protected] on 24 Apr 2008 at 8:09

Attachments:

Stacked bars problem with negative x

What steps will reproduce the problem?
1. at least two sets with negative x
2. try to create a stacked bar graph

What is the expected output? What do you see instead?
A stacked bar graph with negative x instead a "normal" bar graph

What version of the product are you using? On what operating system?
flotr 0.2, ff 3.0.8, win XP sp3


Original issue reported on code.google.com by [email protected] on 8 Apr 2009 at 10:18

Zooming timespan ticks

I really want to use your graphing method, I just cannot seem to get a
string to be input as a tick, or get any type of time to appear as a tick,
it all seems to be decimals. Any way we could see an implementation of a
Time tick method?

History:
I am trying a conversion from FLOT to FLOTR
In FLOT, I used a parser to parse tick values from milliseconds  to
populate the timeline ticks. Very similar to 
http://people.iola.dk/olau/flot/examples/visitors.html

This had several buggy issues, such as no legend being displayed, even when
specified in a <DIV> container, and also became a nightmare for anyone else
updating, so i moved to a homemade time_parser that populated the ticks
based off of an array file that automatically populated 6 month timespans
http://dis.nd.edu/Minfo/status/assyst/
Which does not cater to zomming

I want to be able to look at all data across a timespan from the beginning
of data, making your zoom method perfect, all except for the time tick
calculation =/

Original issue reported on code.google.com by jrizzi1%[email protected] on 25 Feb 2009 at 9:52

Non-numeric values?

I was trying to create a graph using dates as x-axxis values and numeric
values with decimals as y-axxis values but failed.
The graph is displayed but everything is plotted as one row, including all
axxes and legends (a mess really)

{"series":[
["2000-11-02",100],["2000-11-03",100.2794],["2000-11-06",100.7669],["2000-11-07"
,100.6476],["2000-11-08",99.7941],["2000-11-09",98.9499],["2000-11-10",97.2784],
["2000-11-13",96.4095],["2000-11-14",98.2475],["2000-11-15",99.3112],["2000-11-1
6",98.6365],["2000-11-17",98.0304],["2000-11-20",97.033],["2000-11-21",97.3851],
["2000-11-22",95.5616],["2000-11-23",96.0707],["2000-11-24",97.1343],["2000-11-2
7",97.7203],["2000-11-28",96.5603],["2000-11-29",96.3711],["2000-11-30",94.9832]
,["2000-12-01",95.3202],["2000-12-04",94.3514],["2000-12-05",96.518],["2000-12-0
6",96.1133],["2000-12-07",95.4949],["2000-12-08",96.2978],["2000-12-11",97.8899]
,["2000-12-12",97.2703],["2000-12-13",96.771],["2000-12-14",95.2105],["2000-12-1
5",93.7081],["2000-12-18",93.957],["2000-12-19",94.0894],["2000-12-20",91.0453],
["2000-12-21",91.0198],["2000-12-22",92.1764],["2000-12-27",93.199],["2000-12-28
",93.5428],["2000-12-29",92.6224],["2001-01-02",91.2925],["2001-01-03",91.9196],
["2001-01-04",93.0372],["2001-01-05",92.1545],["2001-01-08",92.0844],["2001-01-0
9",91.7009],["2001-01-10",91.4903],["2001-01-11",91.9891],["2001-01-12",92.4218]
,["2001-01-15",93.2079],["2001-01-16",92.8322],["2001-01-17",94.1332],["2001-01-
18",94.3181],["2001-01-19",94.4512],["2001-01-22",94.6991],["2001-01-23",94.5668
],["2001-01-24",95.3176],["2001-01-25",95.8576],["2001-01-26",94.7386],["2001-01
-29",94.9505],["2001-01-30",95.3309],["2001-01-31",95.3502],["2001-02-01",95.255
4],["2001-02-02",94.3134],["2001-02-05",93.9632],["2001-02-06",94.2505],["2001-0
2-07",93.4466],["2001-02-08",93.1084],["2001-02-09",92.016],["2001-02-12",92.763
5],["2001-02-13",92.6374],["2001-02-14",92.1813],["2001-02-15",93.1554],["2001-0
2-16",91.2475],["2001-02-19",91.7981],["2001-02-20",90.7379],["2001-02-21",89.74
81],["2001-02-22",89.5315],["2001-02-23",88.8922],["2001-02-26",89.9247],["2001-
02-27",89.581],["2001-02-28",88.9061],["2001-03-01",87.7967],["2001-03-02",87.82
43],["2001-03-05",88.4752],["2001-03-06",89.5626],["2001-03-07",89.904],["2001-0
3-08",89.5062],["2001-03-09",88.2716],["2001-03-12",85.4663],["2001-03-13",85.92
49],["2001-03-14",84.3495],["2001-03-15",85.2689],["2001-03-16",84.167],["2001-0
3-19",84.4641],["2001-03-20",84.0888],["2001-03-21",83.4365],["2001-03-22",82.43
18],["2001-03-23",83.391],["2001-03-26",85.0039],["2001-03-27",86.4631],["2001-0
3-28",85.2038],["2001-03-29",84.7274],["2001-03-30",84.3615],["2001-04-02",83.97
28],["2001-04-03",82.029],["2001-04-04",82.0896],["2001-04-05",84.4847],["2001-0
4-06",83.341],["2001-04-09",83.9759],["2001-04-10",85.751],["2001-04-11",85.9421
],["2001-04-12",85.9419],["2001-04-17",86.2492],["2001-04-18",89.3765],["2001-04
-19",89.8585],["2001-04-20",88.7456],["2001-04-23",87.9901],["2001-04-24",87.826
3],["2001-04-25",88.3699],["2001-04-26",88.6785],["2001-04-27",89.9641],["2001-0
4-30",90.7637],["2001-05-02",91.6544],["2001-05-03",90.212],["2001-05-04",90.987
],["2001-05-07",91.4287],["2001-05-08",91.0401],["2001-05-09",90.5812],["2001-05
-10",90.7806],["2001-05-11",90.2954],["2001-05-14",89.9711],["2001-05-15",89.870
1],["2001-05-16",90.9777],["2001-05-17",91.8833],["2001-05-18",92.3643],["2001-0
5-21",93.6464],["2001-05-22",94.0637],["2001-05-23",93.4266],["2001-05-24",93.65
88],["2001-05-25",93.0755],["2001-05-28",92.8584],["2001-05-29",92.4458],["2001-
05-30",91.1889],["2001-05-31",91.9035],["2001-06-01",92.082],["2001-06-04",92.50
16],["2001-06-05",93.6706],["2001-06-06",93.0395],["2001-06-07",93.2553],["2001-
06-08",92.6703],["2001-06-11",91.9032],["2001-06-12",90.8754],["2001-06-13",90.2
318],["2001-06-14",88.643],["2001-06-15",88.0747],["2001-06-18",87.0538],["2001-
06-19",87.3583],["2001-06-20",87.5561],["2001-06-21",88.1847],["2001-06-22",88.0
347],["2001-06-25",87.589],["2001-06-26",87.4957],["2001-06-27",87.5021],["2001-
06-28",88.6995],["2001-06-29",89.265],["2001-07-02",90.2835],["2001-07-03",89.81
27],["2001-07-04",89.1805],["2001-07-05",88.3852],["2001-07-06",86.4121],["2001-
07-09",86.4454],["2001-07-10",85.6377],["2001-07-11",85.0798],["2001-07-12",86.7
118],["2001-07-13",87.066],["2001-07-16",86.2849],["2001-07-17",86.2844],["2001-
07-18",85.16],["2001-07-19",86.0228],["2001-07-20",85.6661],["2001-07-23",85.125
6],["2001-07-24",84.1283],["2001-07-25",84.0919],["2001-07-26",84.7687],["2001-0
7-27",85.6057],["2001-07-30",85.9898],["2001-07-31",86.9109],["2001-08-01",87.12
84],["2001-08-02",87.1407],["2001-08-03",86.2513],["2001-08-06",86.0537],["2001-
08-07",86.2953],["2001-08-08",85.1526],["2001-08-09",84.0037],["2001-08-10",83.8
25],["2001-08-13",83.9285],["2001-08-14",84.5088],["2001-08-15",83.7666],["2001-
08-16",83.3336],["2001-08-17",82.3539],["2001-08-20",82.6852],["2001-08-21",82.8
932],["2001-08-22",83.0577],["2001-08-23",83.1603],["2001-08-24",84.1368],["2001
-08-27",84.1869],["2001-08-28",83.3343],["2001-08-29",82.8488],["2001-08-30",81.
6117],["2001-08-31",81.4249],["2001-09-03",81.1654],["2001-09-04",81.7306],["200
1-09-05",80.7792],["2001-09-06",79.3916],["2001-09-07",78.0215],["2001-09-10",78
.0336],["2001-09-11",75.6755],["2001-09-12",76.2439],["2001-09-13",76.5218],["20
01-09-14",75.4344],["2001-09-17",74.4163],["2001-09-18",74.0414],["2001-09-19",7
2.977],["2001-09-20",71.2194],["2001-09-21",71.5166],["2001-09-24",73.138],["200
1-09-25",73.5244],["2001-09-26",73.309],["2001-09-27",73.5767],["2001-09-28",74.
9655],["2001-10-01",74.4426],["2001-10-02",75.06],["2001-10-03",75.8594],["2001-
10-04",76.8203],["2001-10-05",76.7097],["2001-10-08",76.5822],["2001-10-09",75.8
177],["2001-10-10",77.3459],["2001-10-11",78.6019],["2001-10-12",78.1078],["2001
-10-15",77.5721],["2001-10-16",78.0224],["2001-10-17",78.49],["2001-10-18",77.58
45],["2001-10-19",77.2465],["2001-10-22",78.1872],["2001-10-23",79.0771],["2001-
10-24",79.1586],["2001-10-25",78.901],["2001-10-26",79.8291],["2001-10-29",78.23
99],["2001-10-30",77.0946],["2001-10-31",77.5042],["2001-11-01",78.1941],["2001-
11-02",78.4562],["2001-11-05",79.8144],["2001-11-06",80.4847],["2001-11-07",80.2
799],["2001-11-08",81.1898],["2001-11-09",80.8766],["2001-11-12",80.0923],["2001
-11-13",81.8932],["2001-11-14",82.2264],["2001-11-15",82.75],["2001-11-16",83.11
94],["2001-11-19",84.0771],["2001-11-20",83.023],["2001-11-21",82.9731],["2001-1
1-22",83.4347],["2001-11-23",83.7372],["2001-11-26",84.2962],["2001-11-27",83.77
12],["2001-11-28",82.6665],["2001-11-29",82.9586],["2001-11-30",83.2267],["2001-
12-03",82.7977],["2001-12-04",83.5735],["2001-12-05",85.4634],["2001-12-06",85.4
001],["2001-12-07",84.6526],["2001-12-10",83.5348],["2001-12-11",83.6285],["2001
-12-12",83.1348],["2001-12-13",81.8275],["2001-12-14",81.7946],["2001-12-17",82.
3152],["2001-12-18",82.7962],["2001-12-19",82.5828],["2001-12-20",82.0569],["200
1-12-21",82.669],["2001-12-27",83.7846],["2001-12-28",83.9312],["2002-01-02",82.
4865],["2002-01-03",83.9885],["2002-01-04",84.6074],["2002-01-07",84.1845],["200
2-01-08",83.5559],["2002-01-09",83.3196],["2002-01-10",82.5704]],"options":{"mar
gin":
5,"legend":{"position": "se"},"point":{"show":true}}}

Original issue reported on code.google.com by [email protected] on 12 May 2008 at 2:32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.