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
// now that we've figured out the auto values for formatting
// in case we're missing some ticktext, we can break out for array ticks
if(mockAx.tickmode==='array'){
if(major){
tickVals=[];
ticksOut=arrayTicks(ax);
}else{
minorTickVals=[];
minorTicks=arrayTicks(ax);
}
continue;
}
The problem is that arrayTicks(ax) always returns major AND minor ticks- So minorTicks and ticksOut will both contain all ticks. This is not the case were tickmode to be any other setting!
After we acquire the ticks, several hundred lines are dedicated to doing properties and checks dependent on whether we're major or minor- relevant lines concern setting major/minor ID and adjusting dates. This is where possible visual errors could be found, in these edge cases.
At the end, we concatenate minorTicks onto ticksOut right before return:
So we contain two sets of major ticks, two sets of minor ticks, each set the same. You can console.log() it to see.
This doesn't always propogate to the DOM: Since draw functions have to account for axes referring to the same items, they create a set stashed = {} and ensure not to redraw the same item twice. This would catch most errors.
I wanted to produce visual effects on edge cases, but date setting with arrays seems to be entirely wonky:
In
cartesian/axes.js
:calcTicks()
we open a loop:plotly.js/src/plots/cartesian/axes.js
Lines 927 to 929 in 8bf6d89
Where we eventually grab ticks using
tickArray()
:plotly.js/src/plots/cartesian/axes.js
Lines 947 to 958 in 8bf6d89
The problem is that
arrayTicks(ax)
always returns major AND minor ticks- SominorTicks
andticksOut
will both contain all ticks. This is not the case weretickmode
to be any other setting!After we acquire the ticks, several hundred lines are dedicated to doing properties and checks dependent on whether we're major or minor- relevant lines concern setting major/minor ID and adjusting dates. This is where possible visual errors could be found, in these edge cases.
At the end, we concatenate
minorTicks
ontoticksOut
right before return:plotly.js/src/plots/cartesian/axes.js
Lines 1206 to 1208 in 8bf6d89
So we contain two sets of major ticks, two sets of minor ticks, each set the same. You can
console.log()
it to see.This doesn't always propogate to the DOM: Since draw functions have to account for axes referring to the same items, they create a set
stashed = {}
and ensure not to redraw the same item twice. This would catch most errors.I wanted to produce visual effects on edge cases, but date setting with arrays seems to be entirely wonky:
Pull request incoming.
The text was updated successfully, but these errors were encountered: