Hi guys, recently I faced a problem and there are duplicate values on the y-axis of my line chart. can anyone please help me?
More info or some minimal code would help folks suggest solutions Goli. See this helpful post https://community.plotly.com/t/how-to-get-your-questions-answered-on-the-plotly-forum/40551
I saw at least one past solution, if you ran a search, that might give clues?
For example… what yaxis properties are in your code, or are those the defaults?
Is this screenshot showing your full range of y data, or are these low compared to other values?
Are you using one trace or multiple traces? If multiple, do your number formats match (like are they all floats?)
y axis is showing vulnerability number per day and can be None, 0, and any other positive number. When numbers are more than 5 it shows correctly but for numbers, up to 4 or 5, it shows duplicated.
rangemode=“tozero”,
tickformat=‘,d’,
these are the attributes of the graph too.
Am also facing this issue. I have applied below logics. Its resolved now.
-
First check the Y highest value in the graph.
-
In y axis highest value more than 6 , then you can apply the 10 number of ticks(Ntick) in Y axis Property like below
yaxis: {/* Specifies the maximum number of ticks */
nticks: 10 /upto your wish/
} -
If Y axis highest value is 6 or below then the logic something is different.
highest value is 6 then number of ticks 6 and if highest value 5 then number of ticks 5 etc.
yaxis: {/* Specifies the maximum number of ticks */
nticks: 5 /based on the highest value/
} -
If y axis value is 0, then displayed message “no data is available”.
Please apply the above steps and let me still you are getting this issue or resolved.