Skip to content
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

Bars displaying only in one column but tracked x and y values actually move #59

Closed
JacoSmit opened this issue May 13, 2015 · 3 comments
Closed
Labels

Comments

@JacoSmit
Copy link

Hi, I have the following input data for a bars graph but for some reason the bars only display in one column:

menuItemStockCount: [
    { x: 0, y: 200 },
    { x: 1, y: 154 },
    { x: 2, y: 130 },
    { x: 3, y: 300 }
  ]

My code in my .hbs file to display the graph is:

{{#nf-graph width=500 
           height=300 
           paddingRight=10 
           paddingTop=10 
            xScaleType="ordinal" 
            yMinMode="fixed" 
            yMin=0
            showLanes=true
            showFrets=true
            }}
  {{#nf-graph-content}}

    {{nf-bars data=model.menuItemStockCount
                trackingMode="snap-last"
        trackedData=tracked}}    

  {{/nf-graph-content}}

  {{#nf-y-axis as |tick|}}
    <text>{{tick.value}}</text>
  {{/nf-y-axis}}

  {{#nf-x-axis as |tick|}}
    <text>{{tick.value}}</text>
  {{/nf-x-axis}}

 {{/nf-graph}}

 <text>{{tracked.x}} {{tracked.y}}</text>

Am I just doing something wrong?

@benlesh
Copy link
Contributor

benlesh commented May 14, 2015

What version of nf-graph are you on? Latest?

@JacoSmit
Copy link
Author

Hi yes I am on the lastest version of nf-graphs. An image of the current graph is:
screenshot from 2015-05-14 19 58 10

@benlesh benlesh added the bug label May 19, 2015
@benlesh
Copy link
Contributor

benlesh commented May 19, 2015

Okay, thanks, I'll take a look. Strange that we're not seeing this issue yet...

@benlesh benlesh closed this as completed in 2a27b31 Jun 5, 2015
benlesh added a commit that referenced this issue Jun 5, 2015
fix #59 - ensure domains are set before getting scales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants