Skip to content

Commit

Permalink
Merge pull request #17582 from AviVahl/fix-ts4.8-compatibility
Browse files Browse the repository at this point in the history
fix: ensure compatibility with [email protected]
  • Loading branch information
pissang authored Sep 1, 2022
2 parents 3e068d7 + 8b66bf7 commit b9f330b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/animation/basicTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
AnimationOption
} from '../util/types';
import { AnimationEasing } from 'zrender/src/animation/easing';
import Element, { ElementAnimateConfig } from 'zrender/src/Element';
import Element, { ElementAnimateConfig, ElementProps } from 'zrender/src/Element';
import Model from '../model/Model';
import {
isFunction,
Expand Down Expand Up @@ -216,7 +216,7 @@ function animateOrSetProps<Props>(
* position: [100, 100]
* }, seriesModel, function () { console.log('Animation done!'); });
*/
function updateProps<Props>(
function updateProps<Props extends ElementProps>(
el: Element<Props>,
props: Props,
// TODO: TYPE AnimatableModel
Expand All @@ -238,7 +238,7 @@ export {updateProps};
* So do not use this method to one element twice before
* animation starts, unless you know what you are doing.
*/
export function initProps<Props>(
export function initProps<Props extends ElementProps>(
el: Element<Props>,
props: Props,
animatableModel?: Model<AnimationOptionMixin>,
Expand Down Expand Up @@ -335,4 +335,4 @@ export function saveOldStyle(el: Displayable) {

export function getOldStyle(el: Displayable) {
return transitionStore(el).oldStyle;
}
}
7 changes: 4 additions & 3 deletions src/chart/bar/BaseBarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import {
SeriesOnCartesianOptionMixin,
SeriesOnPolarOptionMixin,
ScaleDataValue,
DefaultStatesMixin
DefaultStatesMixin,
StatesMixinBase
} from '../../util/types';
import GlobalModel from '../../model/Global';
import Cartesian2D from '../../coord/cartesian/Cartesian2D';
import SeriesData from '../../data/SeriesData';


export interface BaseBarSeriesOption<StateOption, ExtraStateOption = DefaultStatesMixin>
export interface BaseBarSeriesOption<StateOption, ExtraStateOption extends StatesMixinBase = DefaultStatesMixin>
extends SeriesOption<StateOption, ExtraStateOption>,
SeriesOnCartesianOptionMixin,
SeriesOnPolarOptionMixin {
Expand Down Expand Up @@ -121,4 +122,4 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri

SeriesModel.registerClass(BaseBarSeriesModel);

export default BaseBarSeriesModel;
export default BaseBarSeriesModel;
4 changes: 4 additions & 0 deletions theme/macarons.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@
},

tooltip: {
borderWidth: 0,
backgroundColor: 'rgba(50,50,50,0.5)',
textStyle: {
color: '#FFF'
},
axisPointer: {
type: 'line',
lineStyle: {
Expand Down

0 comments on commit b9f330b

Please sign in to comment.