Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a30ef2

Browse files
committed
robustify is-candlestick check in setAutoType
1 parent 3fbb460 commit 3a30ef2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/plots/cartesian/axis_defaults.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,13 @@ function getBoxPosLetter(trace) {
203203
}
204204

205205
function isBoxWithoutPositionCoords(trace, axLetter) {
206-
var posLetter = getBoxPosLetter(trace);
206+
var posLetter = getBoxPosLetter(trace),
207+
isBox = Registry.traceIs(trace, 'box'),
208+
isCandlestick = isBox && Registry.traceIs(trace._fullInput || {}, 'candlestick');
207209

208210
return (
209-
Registry.traceIs(trace, 'box') &&
210-
trace._fullInput.type === 'box' &&
211+
isBox &&
212+
!isCandlestick &&
211213
axLetter === posLetter &&
212214
trace[posLetter] === undefined &&
213215
trace[posLetter + '0'] === undefined

src/traces/candlestick/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
moduleType: 'trace',
1616
name: 'candlestick',
1717
basePlotModule: require('../../plots/cartesian'),
18-
categories: ['cartesian', 'showLegend'],
18+
categories: ['cartesian', 'showLegend', 'candlestick'],
1919
meta: {
2020
description: [
2121
'The candlestick is a style of financial chart describing',

0 commit comments

Comments
 (0)