Skip to content

Histogram Redraw: replace numeric array with string array breaks redraw function #710

Closed
@scottwittenburg

Description

@scottwittenburg

I'm using plotly.js 1.12.0, and in my browser console I type:

container = document.querySelector('.plotly-container')
Plotly.newPlot(container, [{type: 'histogram', x: [1,3,1,1,2,3,1]}])

this works as expected. Now, according to the documentation I can completely replace the data and then redraw, so I do:

container.data = [{type: 'histogram', x:['one', 'two', 'one', 'one']}]
Plotly.redraw(container)

Which does not update the plot, but generates the following console error:

Error: ax.dtick error: NaN

For me, this is happening on Ubuntu 14.04 in both Chrome (51) and Firefox (47).

Perhaps it is expected that if you replace the numeric data values with strings, then redraw will not work?

Thank you for maintaining an open source project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions