提交 1dfbd904 编写于 作者: L lang

timeline preprocessor

上级 fee3bd38
......@@ -120,7 +120,6 @@ define(function (require) {
var labelPosOpt = timelineModel.get('label.normal.position');
var orient = timelineModel.get('orient');
var viewRect = getViewRect(timelineModel, api);
// Auto label offset.
if (labelPosOpt == null || labelPosOpt === 'auto') {
labelPosOpt = orient === 'horizontal'
......
......@@ -46,9 +46,7 @@ define(function(require) {
delete opt.controlPosition;
}
var data = opt.data || (opt.data = []);
zrUtil.each(data, function (dataItem) {
zrUtil.each(opt.data || [], function (dataItem) {
if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {
if (!has(dataItem, 'value') && has(dataItem, 'name')) {
// In ec2, using name as value.
......
......@@ -261,11 +261,16 @@ define(function (require) {
}
// Preprocess.
each([baseOption].concat(timelineOptions), function (option) {
each(optionPreprocessorFuncs, function (preProcess) {
preProcess(option);
});
});
each([baseOption].concat(timelineOptions)
.concat(zrUtil.map(mediaList, function (media) {
return media.option;
})),
function (option) {
each(optionPreprocessorFuncs, function (preProcess) {
preProcess(option);
});
}
);
return {
baseOption: baseOption,
......
......@@ -6,7 +6,7 @@ define(function () {
}
return {
// 全图默认背景
backgroundColor: 'rgba(0,0,0,0)',
// backgroundColor: 'rgba(0,0,0,0)',
// https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization
// color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册