MCPcopy
hub / github.com/nhn/tui.chart / initializeStack

Function initializeStack

apps/chart/src/store/stackSeriesData.ts:88–103  ·  view source on GitHub ↗
(stackOption: StackOptionType)

Source from the content-addressed store, hash-verified

86}
87
88function initializeStack(stackOption: StackOptionType): Required<StackInfo> | undefined {
89 if (!stackOption) {
90 return;
91 }
92
93 const defaultStackOption = {
94 type: 'normal',
95 connector: false,
96 } as StackInfo;
97
98 if (isStackObject(stackOption)) {
99 return { ...defaultStackOption, ...stackOption } as Required<StackInfo>;
100 }
101
102 return defaultStackOption as Required<StackInfo>;
103}
104
105function isStackObject(stackOption: StackOptionType): stackOption is StackInfo {
106 return isObject(stackOption);

Callers 2

initStackSeriesFunction · 0.85
setStackSeriesDataFunction · 0.85

Calls 1

isStackObjectFunction · 0.85

Tested by

no test coverage detected