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

Some numerical JSON fields are cast as strings #25

Closed
chriddyp opened this issue May 8, 2014 · 1 comment
Closed

Some numerical JSON fields are cast as strings #25

chriddyp opened this issue May 8, 2014 · 1 comment

Comments

@chriddyp
Copy link
Member

chriddyp commented May 8, 2014

In this plot: https://plot.ly/~RgraphingAPI/554/sepallength-vs-petalwidth/, the json looks something like:

{
   "x": [...],
   "y": [...],
   "marker": {"size": "1"}
}

the marker.size attribute should be a number and not a string, e.g.

{
   "x": [...],
   "y": [...],
   "marker": {"size": 1}
}

In this case, plotly didn't understand the string types in marker.size, plotly implicitly set the size to 6. Once it's a number, a marker size and the legend size will look consistent in plotly.

@tdhock
Copy link
Contributor

tdhock commented May 9, 2014

Great, thanks for figuring that out.

On Thu, May 8, 2014 at 6:28 PM, chriddyp notifications@github.com wrote:

In this plot: https://plot.ly/~RgraphingAPI/554/sepallength-vs-petalwidth/,
the json looks something like:

{
"x": [...],
"y": [...],
"marker": {"size": "1"}}

the marker.size attribute should be a number and not a string. In this
case, plotly didn't understand the string types in marker.size, plotly
implicitly set the size to 6. Once it's a number, a marker size and the
legend size will look consistent in plotly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants