File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed
src/apps/weblib/ts-api/plugins Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ ## [ 0.17.0] - 2025-07-31
6+
57### Fixed
68
79- Split chart handled when same dimension on main and sub axis.
Original file line number Diff line number Diff line change @@ -181,23 +181,29 @@ export default class Presets {
181181 } )
182182 }
183183
184- private _getMainAxis ( presetConfig : Config . Chart ) : keyof Config . Channels {
185- const channel = presetConfig . channels ?. x
186- if (
187- this . _isChannel ( channel ) &&
188- channel . set ?. find ( ( series ) => {
189- return series . name === 'stackedBy' || series . name === 'splittedBy'
190- } )
191- ) {
192- return 'y' as keyof Config . Channels
193- }
194-
195- return 'x' as keyof Config . Channels
184+ private _getMainAxis ( presetName : PresetNames ) : keyof Config . Channels {
185+ const presetsWithYMainAxis = new Set ( [
186+ 'bar' ,
187+ 'groupedBar' ,
188+ 'stackedBar' ,
189+ 'splittedBar' ,
190+ 'percentageBar' ,
191+ 'verticalStream' ,
192+ 'verticalViolin' ,
193+ 'verticalLine' ,
194+ 'pie' ,
195+ 'radialBar' ,
196+ 'radialStackedBar' ,
197+ 'donut' ,
198+ 'nestedDonut'
199+ ] )
200+
201+ return presetsWithYMainAxis . has ( presetName ) ? 'y' : 'x'
196202 }
197203
198204 private _buildPresetConfig ( presetName : PresetNames , config : Config . Chart ) : Config . Chart {
199205 const presetConfig = this . _createPresetConfig ( presetName )
200- const mainAxis = this . _getMainAxis ( presetConfig )
206+ const mainAxis = this . _getMainAxis ( presetName )
201207 this . _fillChannels ( presetConfig , config )
202208 this . _setupUserParams ( presetConfig , config , mainAxis )
203209 return presetConfig
You can’t perform that action at this time.
0 commit comments