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

Missing data chart type doesn't seem to obey full_width #399

Closed
reanimus opened this issue Mar 30, 2015 · 5 comments
Closed

Missing data chart type doesn't seem to obey full_width #399

reanimus opened this issue Mar 30, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@reanimus
Copy link

First of all, kudos on this library, It's been a dream to use so far. I'm looking to include the pre-existing 'missing-data' type graphs when we've got insufficient data, but there's a slight annoyance in the way it's rendered at the moment. All of our graphs are set to use full width, but when the graph is a missing data graph, it doesn't fill in horizontal space. It looks like this:

screen shot 2015-03-30 at 5 08 28 pm

Am I doing something wrong here? For reference, these are the options being used:

// Missing
{
    title: this.props.title,
    full_width: true,
    height: 300,
    chart_type: 'missing-data',
    missing_text: 'We are still collecting data. Check back later.'
}
// Present
{
    title: this.props.title,
    data: this.props.data,
    full_width: true,
    show_year_markers: false,
    height: 300,
    target: '#chartcomponent_' + this.props.datasetId,
    x_accessor: 'x',
    y_accessor: 'y'
}
@almossawi
Copy link
Contributor

Indeed, you're right. The missing chart type doesn't call the common init function and so it ends up bypassing that option.

@almossawi almossawi added this to the v2.4 milestone Mar 30, 2015
@almossawi almossawi added the bug label Mar 30, 2015
hamilton added a commit that referenced this issue Mar 31, 2015
…bide by full_width and full_height. Also added a test to verify that the missing chart does indeed satisfy the requirement. Also, changed the name on the data.htm page of the examples.
@hamilton
Copy link
Collaborator

@almossawi @reanimus please take a look at most recent commit. Should in theory fix the bug, but am pretty tired and could use another set of eyes. New test passes, at least :)

almossawi added a commit that referenced this issue Mar 31, 2015
@almossawi
Copy link
Contributor

The line that updates the viewbox was missing, and I updated the left margin in data_graphics.js. Otherwise, this looks good.

@reanimus
Copy link
Author

Agreed! Chart works as intended now. :)

@phubner
Copy link

phubner commented Apr 20, 2015

Was just about to write an issue on this, glad to see it fixed so quickly! Also, +1 on a great library.

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

4 participants