define(function (require) {
var zrUtil = require('zrender/core/util');
var defaultOption = {
show: true,
zlevel: 0, // ????
z: 0, // ????
// ?????
inverse: false,
// ??????????
name: '',
// ??????????'start' | 'middle' | 'end'
nameLocation: 'end',
// ???????????????
nameTextStyle: {},
// ???????
nameGap: 15,
// ?????????
silent: true,
// ????
axisLine: {
// ???????show??????
show: true,
onZero: true,
// ??lineStyle??????
lineStyle: {
color: '#333',
width: 1,
type: 'solid'
}
},
// ??????
axisTick: {
// ??show???????????
show: true,
// ????????grid?
inside: false,
// ??length????
length: 5,
// ??lineStyle??????
lineStyle: {
color: '#333',
width: 1
}
},
// ??????????axis.axisLabel
axisLabel: {
show: true,
// ?????????grid?
inside: false,
rotate: 0,
margin: 8,
// formatter: null,
// ?????????????????TEXTSTYLE
textStyle: {
color: '#333',
fontSize: 12
}
},
// ???
splitLine: {
// ???????show??????
show: true,
// ??lineStyle???lineStyle???????
lineStyle: {
color: ['#ccc'],
width: 1,
type: 'solid'
}
},
// ????
splitArea: {
// ????????show??????
show: false,
// ??areaStyle???areaStyle???????
areaStyle: {
color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
}
}
};
var categoryAxis = zrUtil.merge({
// ?????????????
boundaryGap: true,
// ??????
axisTick: {
interval: 'auto'
},
// ??????????axis.axisLabel
axisLabel: {
interval: 'auto'
}
}, defaultOption);
var valueAxis = zrUtil.defaults({
// ?????????????
boundaryGap: [0, 0],
// ???, ??? 'dataMin' ??????????
// min: null,
// ??????? 'dataMax' ??????????
// max: null,
// Readonly prop, specifies start value of the range when using data zoom.
// rangeStart: null
// Readonly prop, specifies end value of the range when using data zoom.
// rangeEnd: null
// ??0???????????_min?_max??
// scale: false,
// ????????5
splitNumber: 5
// Minimum interval
// minInterval: null
}, defaultOption);
// FIXME
var timeAxis = zrUtil.defaults({
scale: true,
min: 'dataMin',
max: 'dataMax'
}, valueAxis);
var logAxis = zrUtil.defaults({}, valueAxis);
logAxis.scale = true;
return {
categoryAxis: categoryAxis,
valueAxis: valueAxis,
timeAxis: timeAxis,
logAxis: logAxis
};
});
|