123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- var echarts = require("../echarts");
- var zrUtil = require("zrender/lib/core/util");
- var graphic = require("../util/graphic");
- require("../coord/cartesian/Grid");
- require("./axis");
- echarts.extendComponentView({
- type: 'grid',
- render: function (gridModel, ecModel) {
- this.group.removeAll();
- if (gridModel.get('show')) {
- this.group.add(new graphic.Rect({
- shape: gridModel.coordinateSystem.getRect(),
- style: zrUtil.defaults({
- fill: gridModel.get('backgroundColor')
- }, gridModel.getItemStyle()),
- silent: true,
- z2: -1
- }));
- }
- }
- });
- echarts.registerPreprocessor(function (option) {
-
- if (option.xAxis && option.yAxis && !option.grid) {
- option.grid = {};
- }
- });
|