Giter VIP home page Giter VIP logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
I intend to add proper date handling support in the near future. I already have
logics written up in Python, just need to put it into Javascript. That would 
probably
help. :-)

If you want to let Flot decide what it shows on the axis and just 
format/transform
the labels, the ticksFormatter callback is what you need. It requires you to be 
able
to go from an x value to a label.

Did this help? Otherwise I need a bit more info about what exactly Flot is doing
wrong and what you're trying to achieve (a screenshot would probably help).

Original comment by olau%[email protected] on 10 Dec 2007 at 12:58

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
I fixed the issue of strings overflowing far outside the X-axis by manually 
setting
each tick.  However, I get a strange line/fill overflow below the X-axis on 
only one
of my data sets.  Please see the attached image for an example.

Also, can you be more specific on the ticksFormatter callback?  I see in the 
docs it
takes a function, does this function make a number into a string?  What exactly 
is
required?  Thank you...the first build using flot is going well

Original comment by [email protected] on 10 Dec 2007 at 5:36

Attachments:

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Can you post the data set used for that image? It's definitely possible that 
there's
a bug in the clipping algorithm for area graphs.

About the ticksFormatter, yep, you specify a function which gets the tick value 
(a
number corresponding to what you entered in the data set) and returns a string, 
e.g.
like this tick formatter which produces ticks that have a suffix of k, like 
"10k", "20k":

  tickFormatter: function (val) {
    return "" + val + "k";
  }

Original comment by olau%[email protected] on 11 Dec 2007 at 10:34

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Sure, the data set for that graph is:

[[0.0, 14], [0.045, 13], [(0.045*2), 8], [(0.045*3), 5], [(0.045*4), 4], 
[(0.045*5),
4], [(0.045*6), 7], [(0.045*7), 8], [(0.045*8), 9], [(0.045*9), 9], 
[(0.045*10), 12],
[(0.045*11), 2], [(0.045*12), 2], [(0.045*13), 4], [(0.045*14), 4], 
[(0.045*15), 8],
[(0.045*16), 9], [(0.045*17), 10], [(0.045*18), 5], [(0.045*19), 6], 
[(0.045*20), 9],
[(0.045*21), 6]]

Original comment by [email protected] on 11 Dec 2007 at 6:39

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Does anyone have any ideas?

Original comment by [email protected] on 17 Dec 2007 at 8:44

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
How is the date support coming?  I've been using flot quite a bit.

Original comment by [email protected] on 7 Feb 2008 at 5:18

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Hi moninvan, can you also post the options you used?

Original comment by [email protected] on 20 Feb 2008 at 8:19

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Sure.
allDates is an array containing strings in the format "month #".

I haven't look at this code in a while, but the 0.045*x is for manual scaling 
based
on a data set of 21 ticks.  Hope that makes sense.

{
            lines: { show: true, fill: true },
            points: { show: false },
            xaxis:{
            ticks: [[0, allDates[0]], [(0.045*4), allDates[4]], [(0.045*8), allDates[8]],
[(0.045*12), allDates[12]], [(0.045*16), allDates[16]], [(0.045*21), 
allDates[21]]]
            },
            yaxis:{
            max:(numberMax+(.2*numberMax))
            },
            colors: ["#0270BD", "red"]
        }

Original comment by [email protected] on 20 Feb 2008 at 5:36

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Date support is in SVN now. I can't reproduce your problem with overflow below 
the x
axis in the latest release. Please barf if occurs in the future. I think I know 
what
you mean about the margin stuff. Flot didn't prune the available ticks. That 
should
be fixed too, so I'll close this bug now.

Original comment by olau%[email protected] on 6 Mar 2008 at 5:18

  • Changed state: Fixed

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
Thank you... I cant wait for the new version.  

Original comment by [email protected] on 6 Mar 2008 at 8:40

from flot.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 25, 2024
0.4 fixed all of my issues.  well done!

Original comment by [email protected] on 7 Mar 2008 at 11:00

from flot.

Related Issues (20)

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.