@@ -128,7 +128,7 @@ export default class Core {
128
128
area : { series : [ ] , i : [ ] } ,
129
129
scatter : { series : [ ] , i : [ ] } ,
130
130
bubble : { series : [ ] , i : [ ] } ,
131
- column : { series : [ ] , i : [ ] } ,
131
+ bar : { series : [ ] , i : [ ] } ,
132
132
candlestick : { series : [ ] , i : [ ] } ,
133
133
boxPlot : { series : [ ] , i : [ ] } ,
134
134
rangeBar : { series : [ ] , i : [ ] } ,
@@ -141,9 +141,9 @@ export default class Core {
141
141
142
142
gl . series . forEach ( ( serie , st ) => {
143
143
const seriesType =
144
- ser [ st ] . type === 'bar '
145
- ? 'column '
146
- : ser [ st ] . type || ( chartType === 'bar ' ? 'column ' : chartType )
144
+ ser [ st ] . type === 'column '
145
+ ? 'bar '
146
+ : ser [ st ] . type || ( chartType === 'column ' ? 'bar ' : chartType )
147
147
148
148
if ( seriesTypes [ seriesType ] ) {
149
149
if ( seriesType === 'rangeArea' ) {
@@ -154,8 +154,7 @@ export default class Core {
154
154
}
155
155
seriesTypes [ seriesType ] . i . push ( st )
156
156
157
- if ( seriesType === 'column' || seriesType === 'bar' )
158
- w . globals . columnSeries = seriesTypes . column
157
+ if ( seriesType === 'bar' ) w . globals . columnSeries = seriesTypes . bar
159
158
} else if (
160
159
[
161
160
'heatmap' ,
@@ -168,9 +167,6 @@ export default class Core {
168
167
] . includes ( seriesType )
169
168
) {
170
169
nonComboType = seriesType
171
- } else if ( seriesType === 'bar' ) {
172
- seriesTypes [ 'column' ] . series . push ( serie )
173
- seriesTypes [ 'column' ] . i . push ( st )
174
170
} else {
175
171
console . warn (
176
172
`You have specified an unrecognized series type (${ seriesType } ).`
@@ -185,12 +181,9 @@ export default class Core {
185
181
`Chart or series type ${ nonComboType } cannot appear with other chart or series types.`
186
182
)
187
183
}
188
- if (
189
- seriesTypes . column . series . length > 0 &&
190
- cnf . plotOptions . bar . horizontal
191
- ) {
192
- comboCount -= seriesTypes . column . series . length
193
- seriesTypes . column = { series : [ ] , i : [ ] }
184
+ if ( seriesTypes . bar . series . length > 0 && cnf . plotOptions . bar . horizontal ) {
185
+ comboCount -= seriesTypes . bar . series . length
186
+ seriesTypes . bar = { series : [ ] , i : [ ] }
194
187
w . globals . columnSeries = { series : [ ] , i : [ ] }
195
188
console . warn (
196
189
'Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`'
@@ -219,17 +212,15 @@ export default class Core {
219
212
)
220
213
)
221
214
}
222
- if ( seriesTypes . column . series . length > 0 ) {
215
+ if ( seriesTypes . bar . series . length > 0 ) {
223
216
if ( cnf . chart . stacked ) {
224
217
const barStacked = new BarStacked ( ctx , xyRatios )
225
218
elGraph . push (
226
- barStacked . draw ( seriesTypes . column . series , seriesTypes . column . i )
219
+ barStacked . draw ( seriesTypes . bar . series , seriesTypes . bar . i )
227
220
)
228
221
} else {
229
222
ctx . bar = new Bar ( ctx , xyRatios )
230
- elGraph . push (
231
- ctx . bar . draw ( seriesTypes . column . series , seriesTypes . column . i )
232
- )
223
+ elGraph . push ( ctx . bar . draw ( seriesTypes . bar . series , seriesTypes . bar . i ) )
233
224
}
234
225
}
235
226
if ( seriesTypes . rangeArea . series . length > 0 ) {
0 commit comments