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

fix(markline): click markline will cause the first column to be selected #20620

Open
wants to merge 2 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
4 changes: 3 additions & 1 deletion src/component/marker/MarkLineView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ class MarkLineView extends MarkerView {
getECData(el).dataModel = mlModel;

el.traverse(function (child) {
getECData(child).dataModel = mlModel;
const ecData = getECData(child);
ecData.dataModel = mlModel;
ecData.dataType = 'marker';
});
});

Expand Down
5 changes: 5 additions & 0 deletions src/model/Series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,11 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode

// PENGING If selectedMode is null ?
select(innerDataIndices: number[], dataType?: SeriesDataType): void {
// discard the marker series select event at now.
// TODO support marker(markerArea, markLine, etc) series select event.
if (dataType === 'marker') {
return;
};
this._innerSelect(this.getData(dataType), innerDataIndices);
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export type SeriesLayoutBy = typeof SERIES_LAYOUT_BY_COLUMN | typeof SERIES_LAYO
// Like `sourceHeader: 2`, means line 0 and line 1 are header, data start from line 2.
export type OptionSourceHeader = boolean | 'auto' | number;

export type SeriesDataType = 'main' | 'node' | 'edge';
export type SeriesDataType = 'main' | 'node' | 'edge' | 'marker';


// --------------------------------------------
Expand Down
43 changes: 42 additions & 1 deletion test/markLine.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.