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

feat: Add stackDim to specify axis to stack #16750

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions src/data/helper/dataStackHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ export function enableDataStack(
}

if (mayStack && !dimensionInfo.isExtraCoord) {
//If a dimension is specified by user, use it as stack dimension
let stackDim = seriesModel && seriesModel.get('stackDim');
if (dimensionInfo && stackDim === dimensionInfo.name) {
stackedDimInfo = dimensionInfo;
}
// Find the first ordinal dimension as the stackedByDimInfo.
if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) {
stackedByDimInfo = dimensionInfo;
Expand Down
3 changes: 2 additions & 1 deletion src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,8 @@ export interface SeriesLargeOptionMixin {
largeThreshold?: number
}
export interface SeriesStackOptionMixin {
stack?: string
stack?: string,
stackDim?: string
}

type SamplingFunc = (frame: ArrayLike<number>) => number;
Expand Down
Loading