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(type): add missing type number to emphasis.scale for scatter/line/graph series #17390

Merged
merged 2 commits into from
Jul 19, 2022
Merged
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: 2 additions & 2 deletions src/action/roamHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type View from '../coord/View';
import type ExtensionAPI from '../core/ExtensionAPI';
import type { Payload } from '../util/types';

export interface RoamPaylod extends Payload {
export interface RoamPayload extends Payload {
dx: number
dy: number
zoom: number
Expand All @@ -39,7 +39,7 @@ function getCenterCoord(view: View, point: number[]) {

export function updateCenterAndZoom(
view: View,
payload: RoamPaylod,
payload: RoamPayload,
zoomLimit?: {
min?: number,
max?: number
Expand Down
4 changes: 2 additions & 2 deletions src/chart/graph/GraphSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export interface GraphSeriesOption

emphasis?: {
focus?: Exclude<GraphNodeItemOption['emphasis'], undefined>['focus']
scale?: boolean
scale?: boolean | number
label?: SeriesLabelOption
edgeLabel?: SeriesLabelOption
itemStyle?: ItemStyleOption
Expand Down Expand Up @@ -513,4 +513,4 @@ class GraphSeriesModel extends SeriesModel<GraphSeriesOption> {
};
}

export default GraphSeriesModel;
export default GraphSeriesModel;
4 changes: 2 additions & 2 deletions src/chart/graph/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import createView from './createView';
import View from '../../coord/View';
import GraphView from './GraphView';
import GraphSeriesModel from './GraphSeries';
import { RoamPaylod, updateCenterAndZoom } from '../../action/roamHelper';
import { RoamPayload, updateCenterAndZoom } from '../../action/roamHelper';
import GlobalModel from '../../model/Global';
import { noop } from 'zrender/src/core/util';
import type ExtensionAPI from '../../core/ExtensionAPI';
Expand Down Expand Up @@ -73,7 +73,7 @@ export function install(registers: EChartsExtensionInstallRegisters) {
}, noop);

// Register roam action.
registers.registerAction(actionInfo, function (payload: RoamPaylod, ecModel: GlobalModel, api: ExtensionAPI) {
registers.registerAction(actionInfo, function (payload: RoamPayload, ecModel: GlobalModel, api: ExtensionAPI) {
ecModel.eachComponent({
mainType: 'series', query: payload
}, function (seriesModel: GraphSeriesModel) {
Expand Down
2 changes: 1 addition & 1 deletion src/chart/line/LineSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type LineDataValue = OptionDataValue | OptionDataValue[];
interface LineStateOptionMixin {
emphasis?: {
focus?: DefaultEmphasisFocus
scale?: boolean
scale?: boolean | number
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/chart/scatter/ScatterSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ interface ScatterStateOption<TCbParams = never> {
interface ScatterStatesOptionMixin {
emphasis?: {
focus?: DefaultEmphasisFocus
scale?: boolean
scale?: boolean | number
}
}

Expand Down Expand Up @@ -163,4 +163,4 @@ class ScatterSeriesModel extends SeriesModel<ScatterSeriesOption> {

}

export default ScatterSeriesModel;
export default ScatterSeriesModel;
6 changes: 3 additions & 3 deletions src/chart/tree/treeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import {updateCenterAndZoom, RoamPaylod} from '../../action/roamHelper';
import {updateCenterAndZoom, RoamPayload} from '../../action/roamHelper';
import { Payload } from '../../util/types';
import TreeSeriesModel from './TreeSeries';
import GlobalModel from '../../model/Global';
Expand Down Expand Up @@ -52,7 +52,7 @@ export function installTreeAction(registers: EChartsExtensionInstallRegisters) {
// the layout. So don't need to go through the whole update process, such
// as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
update: 'none'
}, function (payload: RoamPaylod, ecModel: GlobalModel, api: ExtensionAPI) {
}, function (payload: RoamPayload, ecModel: GlobalModel, api: ExtensionAPI) {
ecModel.eachComponent({
mainType: 'series', subType: 'tree', query: payload
}, function (seriesModel: TreeSeriesModel) {
Expand All @@ -67,4 +67,4 @@ export function installTreeAction(registers: EChartsExtensionInstallRegisters) {
});
});

}
}
6 changes: 3 additions & 3 deletions src/component/geo/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import geoCreator from '../../coord/geo/geoCreator';
import { ActionInfo } from '../../util/types';
import { each } from 'zrender/src/core/util';
import GlobalModel from '../../model/Global';
import { updateCenterAndZoom, RoamPaylod } from '../../action/roamHelper';
import { updateCenterAndZoom, RoamPayload } from '../../action/roamHelper';
import MapSeries from '../../chart/map/MapSeries';
import GeoView from './GeoView';
import geoSourceManager from '../../coord/geo/geoSourceManager';
Expand Down Expand Up @@ -115,7 +115,7 @@ export function install(registers: EChartsExtensionInstallRegisters) {
type: 'geoRoam',
event: 'geoRoam',
update: 'updateTransform'
}, function (payload: RoamPaylod, ecModel: GlobalModel, api: ExtensionAPI) {
}, function (payload: RoamPayload, ecModel: GlobalModel, api: ExtensionAPI) {
const componentType = payload.componentType || 'series';

ecModel.eachComponent(
Expand Down Expand Up @@ -147,4 +147,4 @@ export function install(registers: EChartsExtensionInstallRegisters) {
}
);
});
}
}