Comments (11)
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.
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.
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.
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.
Does anyone have any ideas?
Original comment by [email protected]
on 17 Dec 2007 at 8:44
from flot.
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.
Hi moninvan, can you also post the options you used?
Original comment by [email protected]
on 20 Feb 2008 at 8:19
from flot.
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.
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.
Thank you... I cant wait for the new version.
Original comment by [email protected]
on 6 Mar 2008 at 8:40
from flot.
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)
- Non-time axis tick-generation broken when reusing plots HOT 1
- $.plot.formatDate() no longer accessible HOT 1
- flot inside a tab
- Not Plotting In Safari
- Standardize fill and fillColor across bar and pie charts
- "steps" without extra points HOT 1
- there is a error in the file jquery.flot.pie.js!
- threshold function and tooltips not working together HOT 1
- xaxis tick marks for time series isshe when over 24 hours. v0.8.
- In case of long number transferred to x axis, its overlaps. HOT 1
- Invalid Bar Alignment
- Check if a point is already highlighted
- Error Bars not playing nicely with time plugin (x-axis auto scales to origin 1970)
- Showing data pionts in stacked chart
- plot hover
- "offset" parameter for bar charts
- Duplicate plot rendering of Flot graph HOT 1
- Flot doesn't handle summertime (BST) correctly. HOT 1
- Can I change the tickColor for only one tick
- Legend label is not displayed if label is empty string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flot.