Skip to content

Commit

Permalink
[radar] Fix #3934 (triggerEvent not works in radar)
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Oct 25, 2016
1 parent 49fb657 commit 1ff7c9b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/coord/radar/RadarModel.js
Expand Up @@ -29,6 +29,8 @@ define(function (require) {
var showName = this.get('name.show');
var nameFormatter = this.get('name.formatter');
var nameGap = this.get('nameGap');
var triggerEvent = this.get('triggerEvent');

var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {
// PENDING
if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {
Expand All @@ -50,7 +52,8 @@ define(function (require) {
nameLocation: 'end',
nameGap: nameGap,
// min: 0,
nameTextStyle: nameTextStyle
nameTextStyle: nameTextStyle,
triggerEvent: triggerEvent
}, false);
if (!showName) {
indicatorOpt.name = '';
Expand All @@ -63,11 +66,18 @@ define(function (require) {
indicatorOpt.name, indicatorOpt
);
}
return zrUtil.extend(
var model = zrUtil.extend(
new Model(indicatorOpt, null, this.ecModel),
axisModelCommonMixin
);

// For triggerEvent.
model.mainType = 'radar';
model.componentIndex = this.componentIndex;

return model;
}, this);

this.getIndicatorModels = function () {
return indicatorModels;
};
Expand Down

0 comments on commit 1ff7c9b

Please sign in to comment.