提交 75ed3e23 编写于 作者: P pah100

Merge branch 'dev-3.0.0' of https://github.com/ecomfe/echarts into dev-3.0.0

......@@ -303,7 +303,7 @@ define(function (require) {
var textarea = document.createElement('textarea');
// Textarea style
textarea.style.cssText = 'display:block;width:100%;font-size:14px;line-height:1.6rem;font-family:Monaco,Consolas,Courier New';
textarea.style.cssText = 'display:block;width:100%;font-size:14px;line-height:1.6rem;font-family:Monaco,Consolas,Courier new,monospace';
textarea.readOnly = model.get('readOnly');
textarea.style.color = model.get('textColor');
textarea.style.borderColor = model.get('textareaBorderColor');
......
......@@ -5,6 +5,15 @@ define(function (require) {
require('./tooltip/TooltipView');
// Show tip action
/**
* @action
* @property {string} type
* @property {number} seriesIndex
* @property {number} dataIndex
* @property {number} [x]
* @property {number} [y]
*/
require('../echarts').registerAction(
{
type: 'showTip',
......@@ -14,4 +23,14 @@ define(function (require) {
// noop
function () {}
);
// Hide tip action
require('../echarts').registerAction(
{
type: 'hideTip',
event: 'hideTip',
update: 'none'
},
// noop
function () {}
);
});
\ No newline at end of file
......@@ -170,6 +170,7 @@ define(function (require) {
this._tooltipContent = tooltipContent;
api.on('showTip', this._manuallyShowTip, this);
api.on('hideTip', this._hide, this);
},
render: function (tooltipModel, ecModel, api) {
......
......@@ -101,7 +101,7 @@ define(function (require) {
// 脱离0值比例,放大聚焦到最终_min,_max区间
// scale: false,
// 分割段数,默认为5
splitNumber: 6
splitNumber: 5
}, defaultOption);
// FIXME
......
......@@ -38,12 +38,18 @@ define(function (require) {
// TODO Transform first or filter first
var PROCESSOR_STAGES = ['transform', 'filter', 'statistic'];
function registerEventWithLowercaseName(eventName, handler, context) {
// Event name is all lowercase
eventName = eventName && eventName.toLowerCase();
Eventful.prototype.on.call(this, eventName, handler, context);
}
/**
* @module echarts~MessageCenter
*/
function MessageCenter() {
Eventful.call(this);
}
MessageCenter.prototype.on = registerEventWithLowercaseName;
zrUtil.mixin(MessageCenter, Eventful);
/**
* @module echarts~ECharts
......@@ -574,6 +580,12 @@ define(function (require) {
}
};
/**
* Register event
* @method
*/
echartsProto.on = registerEventWithLowercaseName;
/**
* @param {string} methodName
* @private
......@@ -1040,7 +1052,8 @@ define(function (require) {
event: eventName
}][0]);
actionInfo.event = actionInfo.event || actionType;
// Event name is all lowercase
actionInfo.event = (actionInfo.event || actionType).toLowerCase();
eventName = actionInfo.event;
if (!actions[actionType]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册