-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticks option do not work on Bar chart #152
Comments
Real-time or static bar charts? Can you provide a quick code snippet with comments so I can see exactly what you're trying to do? |
It's with Static bar charts. Here is the code snippet $(document).ready(function() {
var myData = [
{
label: 'Series 1',
values: [
{ x: 10, y: 109 },
{ x: 11, y: 103 },
{ x: 12, y: 120 },
{ x: 13, y: 100 },
{ x: 14, y: 127 },
{ x: 15, y: 102 },
{ x: 16, y: 115 },
{ x: 17, y: 119 },
{ x: 18, y: 100 },
{ x: 19, y: 122 },
{ x: 20, y: 106 }
]
}
];
var chart = $('#bar')
.epoch({
type: 'bar',
data: myData,
ticks: { bottom: 3 }
});
}); |
Hi Ticks actually works on left and right, but not on top or bottom. Below is an example of my code:
Epoch is a great java visualization tool :-) Thank you! |
@elfenheart - So the bar chart uses an ordinal scale for the x axis. The |
@rsandor Sounds good! Out of curiosity, how is it different than how you are implementing it with the live bar chart? |
The static bar chart was built using the d3 enter-update-exit paradigm, and uses the ordinal scale specifically to allow for grouped bar charts. The real-time bar chart uses a windowed time-scaled axis of my own design to allow for smooth animation of incoming points over time (for an in-depth treatment read the base time plot class: https://github.com/fastly/epoch/blob/master/src/time.coffee). |
@elfenheart, @mamac - So I just pushed a new branch that should address this issue. Essentially we have to emulate d3's linear axis Please take a look at it and try it out, if it does the job then I will get full testing in and merge it into master asap. Cheers. |
@mamac - Can you please share the code you were using for the above example? |
Thank you for fast reply. This is what I use (within a Twig view):
|
seems like it works for me: @mamac you need to recompile the code after you pull from the branch |
Indeed I just downloaded epoch.min.js and assumed it was compiled in that branch. |
Compilation doesn't work here, I got the following:
Can anyone post the compiled js script so I can test it? Thank you |
Have you run "npm install" from the epoch source directory yet?
|
@rsandor I just ran "npm install" as you suggest but got many errors: http://pastebin.com/j98446z6 Then when I start "cake build" it hangs as below:
|
Hmm looks like one of the packages requires python 2 and you have 3. Let me
|
@mamac - Here's the unminified js for the branch: http://filebin.ca/1tpLN75vaPGO/epoch.js |
@rsandor, that's very kind of you. I confim it works: Thank you! |
This should be fixed in master now. Thanks guys! |
Just downloaded the epoch.min.js from the master branch and the issue is back. |
I'm noticing this as well. I'm using the real-time bar chart and would like to increase the number of time stamps on the bottom of the chart. No matter what I change
|
Somehow old thread but @jme783 is correct. It doesn't work in real-time line chart either! |
When I specify the number of Ticks option on a bar chart, it doesn't work. It will still give the ticks for each data points.
The text was updated successfully, but these errors were encountered: