You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@etpinard, thanks for your answer. But it seems that it is not possible to set the separators independently per axis, e. g. yaxis2 has a different separator than yaxis. Is this correct?
Why do you different separator styles on different axes?
Sure. The user within my application can choose their column format which can be a comma or a dot decimal notation. They can upload data and visualize it. Maybe one source of the data has dot, another comma decimal notation. Either way, the user can choose their format.
I can't make this decision. I let the user decide that. Also it's just the output, not the actual number. Maybe the user can't modify the data before he imports it into my application.
Ok. Well, we could add attributes xaxis.separtors and yaxis.separators that would either inherit from layout.separators or be set individually. I'll change the issue title accordingly.
This won't be a high priority item for the foreseeable future, so don't expect it getting implementing anytime soon, unless you're willing to make a PR to this repo.
Also, similar to calendars #1220 - if your users are providing this data as text, not numbers, we currently only support parsing with '.' as the decimal separator. If we need to support other text formats (which may be independent of how you want to display the data in tick & hover labels) we'll need separators as a trace property too.
Coming back to this in the context of #2207 and my comment that we may consider removing separators altogether in v2 #420 (comment) and supporting only config.locale:
@ndabAP seems like you're concerned with interpreting numeric strings being passed into your system with different separators - potentially several different formats within the same graph? In principle this isn't even just per-axis OR per-trace, but per-data-array - so we'd need something like trace.xseparators and trace.marker.line.widthseparators etc etc... which makes me think that this doesn't really belong in plotly.js but at a higher level of application logic (ie sanitize the data before passing it to plotly.js) - kind of like how we don't accept dates in any string form besides (potentially truncated) ISO 8601 format.
And then as far as display (tick and hover labels) - even if we did support parsing different arrays within a plot differently, I think we want a single display format throughout the plot - whether based on layout.separators or config.locale - otherwise we're just inviting confusion.
Activity
etpinard commentedon Jul 3, 2017
What should it do? It's not obvious to me from reading the docs.
You might be looking for
layout.separatorattribute.ndabAP commentedon Jul 4, 2017
@etpinard, last two axis labels should be 1,65 and 1,7 not 000000 ... When I define
layout.separatoras,.it works without any problem.What if my x axis values should be comma decimal and my y axis should be dot decimal notation? E. G.:
x: 1.5, 1.7
y: 2.1, 2.5
should be displayed as
x: 1,5, 1,1
y: 2.1, 2.5
Is this possible?
etpinard commentedon Jul 4, 2017
Yes, using
layout.separatorsas in https://codepen.io/etpinard/pen/awKoBP?editors=0010ndabAP commentedon Jul 5, 2017
@etpinard, thanks for your answer. But it seems that it is not possible to set the separators independently per axis, e. g.
yaxis2has a different separator thanyaxis. Is this correct?etpinard commentedon Jul 5, 2017
That's correct.
layout.separatorsis a global setting and there's no corresponding per-axis attribute.Can I ask? Why do you different separator styles on different axes?
ndabAP commentedon Jul 5, 2017
Sure. The user within my application can choose their column format which can be a comma or a dot decimal notation. They can upload data and visualize it. Maybe one source of the data has dot, another comma decimal notation. Either way, the user can choose their format.
etpinard commentedon Jul 5, 2017
Hmm. But
layout.seperatorsis meant to control the output format of those numbers on the graph. Wouldn't you want that to be consistent?ndabAP commentedon Jul 5, 2017
I can't make this decision. I let the user decide that. Also it's just the output, not the actual number. Maybe the user can't modify the data before he imports it into my application.
etpinard commentedon Jul 5, 2017
Ok. Well, we could add attributes
xaxis.separtorsandyaxis.separatorsthat would either inherit fromlayout.separatorsor be set individually. I'll change the issue title accordingly.This won't be a high priority item for the foreseeable future, so don't expect it getting implementing anytime soon, unless you're willing to make a PR to this repo.
[-]Setting "tickformat" to ",." results in strange result[/-][+]Per-axis separators attribute[/+]ndabAP commentedon Jul 12, 2017
Sounds great!
alexcjohnson commentedon Jul 13, 2017
Also, similar to calendars #1220 - if your users are providing this data as text, not numbers, we currently only support parsing with
'.'as the decimal separator. If we need to support other text formats (which may be independent of how you want to display the data in tick & hover labels) we'll need separators as a trace property too.alexcjohnson commentedon Dec 15, 2017
Coming back to this in the context of #2207 and my comment that we may consider removing
separatorsaltogether in v2 #420 (comment) and supporting onlyconfig.locale:@ndabAP seems like you're concerned with interpreting numeric strings being passed into your system with different separators - potentially several different formats within the same graph? In principle this isn't even just per-axis OR per-trace, but per-data-array - so we'd need something like
trace.xseparatorsandtrace.marker.line.widthseparatorsetc etc... which makes me think that this doesn't really belong in plotly.js but at a higher level of application logic (ie sanitize the data before passing it to plotly.js) - kind of like how we don't accept dates in any string form besides (potentially truncated) ISO 8601 format.And then as far as display (tick and hover labels) - even if we did support parsing different arrays within a plot differently, I think we want a single display format throughout the plot - whether based on
layout.separatorsorconfig.locale- otherwise we're just inviting confusion.etpinard commentedon Apr 12, 2019
This ticket most likely won't be implemented. Closing.
#1842 (comment) sums up our current state-of-mind on the topic.