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

Multicategory Multilevel 2+ & Sorting Multicategory #6327

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
be5d16b
sorting single trace OK
richardnm-2 Sep 21, 2022
202e6de
n levels setconvert 1 trace OK
richardnm-2 Sep 21, 2022
3de9038
stacking 3 labels on x OK
richardnm-2 Sep 21, 2022
06b03ba
3 levels plotting, labels zoado
richardnm-2 Sep 22, 2022
0ff71a8
dynamic lavels vertical X OK
richardnm-2 Sep 22, 2022
c184cdc
vertical alignment x axis seems OK
richardnm-2 Sep 23, 2022
176f623
teste secondaryLabels
richardnm-2 Sep 23, 2022
66ff0ff
labels when not shared OK
richardnm-2 Sep 23, 2022
18064b7
labels repeating OK
richardnm-2 Sep 23, 2022
46ba0f1
labels object.keys
richardnm-2 Sep 23, 2022
1dc7c17
TODO DIVIDERS
richardnm-2 Sep 23, 2022
3cb80de
labels loop and reverse corrected
richardnm-2 Sep 23, 2022
95f8674
dividers with levels OK, print NOT OK
richardnm-2 Sep 24, 2022
62d629d
plot checkpoint
richardnm-2 Sep 24, 2022
b2761eb
divider depth OK, but not plotting 2nd line
richardnm-2 Sep 24, 2022
0aff254
dividers remove -> plot OK
richardnm-2 Sep 24, 2022
774d6e5
checkpoint plot axes OK
richardnm-2 Sep 24, 2022
78e7e9b
sorting inside ax.setupMultiCategory OK
richardnm-2 Sep 24, 2022
6a5b8b0
console log cleanup
richardnm-2 Sep 24, 2022
450b7aa
multiple tracces test 1
richardnm-2 Sep 24, 2022
39809ba
multiple traces OK
richardnm-2 Sep 24, 2022
b81dce1
teste boxplot
richardnm-2 Sep 24, 2022
3b7ec42
validação list NOT OK
richardnm-2 Sep 24, 2022
3d79506
slice cols before reversing - inplace reverse
richardnm-2 Sep 24, 2022
a4eca4f
vai
richardnm-2 Sep 24, 2022
3615690
teste 3levels OK
richardnm-2 Sep 24, 2022
a68819b
getLabelBox dynamic
richardnm-2 Sep 25, 2022
fbbcc9c
index 3 levels 2 pts test
richardnm-2 Sep 25, 2022
3ec2f0b
Merge branch 'master' of https://github.com/richardnm-2/plotly.js
richardnm-2 Sep 25, 2022
630d00a
.vscode debugger OK
richardnm-2 Sep 25, 2022
36efc91
square matrix before transpose
richardnm-2 Sep 25, 2022
d57f5f0
codepen cleanup
richardnm-2 Sep 25, 2022
64561e7
hover text OK
richardnm-2 Sep 25, 2022
76ef318
pre minify cleanup
richardnm-2 Sep 25, 2022
e03e17e
hover text fix
richardnm-2 Sep 26, 2022
bc3358f
solved dividers remove
richardnm-2 Sep 27, 2022
dc94e50
pr OK
richardnm-2 Sep 27, 2022
7550011
hover text trim
richardnm-2 Sep 27, 2022
1b5748f
hovertext fix
richardnm-2 Sep 27, 2022
817a4a5
replicating on index
richardnm-2 Sep 27, 2022
7c8506c
heatmap test OK - yaxis questionable
richardnm-2 Sep 28, 2022
3925975
hover labe test OK - todo candlestick y axis multicategory
richardnm-2 Sep 28, 2022
c6e1690
Merge branch 'PR' of https://github.com/richardnm-2/plotly.js into PR
richardnm-2 Sep 28, 2022
fafd82b
debugger cleanup
richardnm-2 Sep 28, 2022
75e927f
lint
richardnm-2 Sep 28, 2022
34f23e6
Merge branch 'PR' of https://github.com/richardnm-2/plotly.js into PR
richardnm-2 Sep 28, 2022
49047b4
.at not supported
richardnm-2 Sep 28, 2022
25016f2
no valLetter (no y) -> nullArray
richardnm-2 Sep 28, 2022
60360ea
remove null from axis array trace OK
richardnm-2 Sep 29, 2022
059343f
sorting typed arrays OK
richardnm-2 Sep 29, 2022
46332a9
lint
richardnm-2 Sep 29, 2022
05ebb13
hover texts categories undefined resolved
richardnm-2 Sep 29, 2022
595de82
tick level rename
richardnm-2 Oct 2, 2022
68a2305
assert axLettter in trace
richardnm-2 Oct 2, 2022
2d33da3
axLetter y & valLetter x
richardnm-2 Oct 2, 2022
0135ec7
lock
richardnm-2 Oct 2, 2022
76ebc0c
Add .circleci/config.yml
richardnm-2 Apr 13, 2023
60ae004
Merge remote-tracking branch 'upstream/master' into circleci-project-…
Dec 28, 2023
b21f685
.
Dec 28, 2023
656bfb8
multicategory testing log
Dec 28, 2023
0475265
Merge branch 'circleci-project-setup' into PR
Dec 28, 2023
e67b25e
.
Dec 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debugger cleanup
richardnm-2 committed Sep 28, 2022
commit fafd82b4cc9cf95044beeb39d4537dd5dbadb22b
2 changes: 0 additions & 2 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
@@ -2519,7 +2519,6 @@ axes.drawOne = function(gd, ax, opts) {
ax.levelNr = 2;
ax.levels = [0, 1];
}
// debugger;
ax.levels.slice().reverse().slice(0, ax.levelNr - 1).forEach(function(_lvl) {
var pad = {x: 0 * _lvl, y: 10}[axLetter];

@@ -2778,7 +2777,6 @@ function getDividerVals(ax, vals) {
}
};

// debugger
if(ax.showdividers && vals.length && ax.levels) {
ax.levels.forEach(function(_lvl) {
current = undefined;
4 changes: 0 additions & 4 deletions src/plots/cartesian/set_convert.js
Original file line number Diff line number Diff line change
@@ -430,15 +430,13 @@ module.exports = function setConvert(ax, fullLayout) {

if(trace.type === 'ohlc' | trace.type === 'candlestick') {
var sortedValsTransform = sortLib.transpose(axVals);
// debugger;
gd._fullData[i].open = sortedValsTransform[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my previous comment about adding things to ax, we can't be overwriting contents of gd._fullData in a way that conflicts with the contents of gd.data, but if necessary we can add underscore-prefixed attributes.

Also: this section looks a bit too tightly coupled with concerns that belong to individual trace types. If we need to have logic here that's specific to one or two trace types, that functionality should go in the trace module and get called from there, something like:

var traceSetup = gd._fullData[i]._module.setupMultiCategory;
if(traceSetup) {
    traceSetup(gd._fullData[i], sortedValsTransform);
}

Then candlestick and ohlc would opt into this behavior by defining a setupMultiCategory function in their index files

gd._fullData[i].high = sortedValsTransform[1];
gd._fullData[i].low = sortedValsTransform[2];
gd._fullData[i].close = sortedValsTransform[3];
}
// Could/should set sorted y axis values for each trace as the sorted values are already available.
// Need write access to gd._fullData, bad? Should probably be done right at newPlot, or on setting gd._fullData
// debugger;

var transposedAxLabels = sortLib.transpose(axLabels);
gd._fullData[i][axLetter] = transposedAxLabels;
@@ -451,14 +449,12 @@ module.exports = function setConvert(ax, fullLayout) {
ax.levelNr = axLabels[0].length;
ax.levels = axLabels[0].map(function(_, idx) {return idx;});

// debugger
var fullSortedObjectList = sortLib.sortObjectList(cols, fullObjectList.slice());
var fullList = sortLib.objectListToList(fullSortedObjectList);
var fullSortedMatrix = sortLib.sortedMatrix(fullList);

var fullXs = fullSortedMatrix[0].slice();

// debugger;
for(i = 0; i < fullXs.length; i++) {
setCategoryIndex(fullXs[i]);
}
2 changes: 1 addition & 1 deletion test/jasmine/tests/hover_label_test.js
Original file line number Diff line number Diff line change
@@ -5863,7 +5863,7 @@ describe('hovermode: (x|y)unified', function() {
var mockOhlc = require('@mocks/finance_multicategory.json');
var mockCopy = Lib.extendDeep({}, mockOhlc);
mockCopy.layout.hovermode = 'x unified';
debugger;

Plotly.newPlot(gd, mockCopy)
.then(function(gd) {
_hover(gd, {curveNumber: 0, pointNumber: 0});