/
githubmirror
/
echarts
Обзор
Документация
Войти
/
githubmirror
/
echarts
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/core/lifecycle.ts
74 строки
3 KB
100pah
fix(appendData): Fix that the dataZoom inside is disabled when appendData is executed. And clarify the usage of appendData in comments.
08 мар 2026, 12:34
08 мар 2026, 12:34
eb7530b
Код
Авторство
О чём код?
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import Eventful, { EventCallback } from 'zrender/src/core/Eventful'; import SeriesModel from '../model/Series'; import GlobalModel from '../model/Global'; import { EChartsType } from './echarts'; import ExtensionAPI from './ExtensionAPI'; import { ModelFinderIdQuery, ModelFinderIndexQuery } from '../util/model'; import { DimensionLoose } from '../util/types'; export interface UpdateLifecycleTransitionSeriesFinder { seriesIndex?: ModelFinderIndexQuery, seriesId?: ModelFinderIdQuery dimension: DimensionLoose; } export interface UpdateLifecycleTransitionItem { // If `from` not given, it means that do not make series transition mandatorily. // There might be transition mapping dy default. Sometimes we do not need them, // which might bring about misleading. from?: UpdateLifecycleTransitionSeriesFinder | UpdateLifecycleTransitionSeriesFinder[]; to: UpdateLifecycleTransitionSeriesFinder | UpdateLifecycleTransitionSeriesFinder[]; }; export type UpdateLifecycleTransitionOpt = UpdateLifecycleTransitionItem | UpdateLifecycleTransitionItem[]; export interface UpdateLifecycleParams { updatedSeries?: SeriesModel[] /** * If this update is from setOption and option is changed. */ optionChanged?: boolean // Specify series to transition in this setOption. seriesTransition?: UpdateLifecycleTransitionOpt } interface LifecycleEvents { 'afterinit': [EChartsType], 'coordsys:aftercreate': [GlobalModel, ExtensionAPI], 'series:beforeupdate': [GlobalModel, ExtensionAPI, UpdateLifecycleParams], 'series:layoutlabels': [GlobalModel, ExtensionAPI, UpdateLifecycleParams], 'series:transition': [GlobalModel, ExtensionAPI, UpdateLifecycleParams], 'series:afterupdate': [GlobalModel, ExtensionAPI, UpdateLifecycleParams] // 'series:beforeeachupdate': [GlobalModel, ExtensionAPI, SeriesModel] // 'series:aftereachupdate': [GlobalModel, ExtensionAPI, SeriesModel] 'afterupdate': [GlobalModel, ExtensionAPI] } const lifecycle = new Eventful<{ [key in keyof LifecycleEvents]: EventCallback<LifecycleEvents[key]> }>(); export default lifecycle; export {LifecycleEvents};