@alicloud/cloud-charts
Version:

119 lines (113 loc) • 3.36 kB
JavaScript
;
exports.__esModule = true;
exports.SHOOT_NAME = exports.POINT_NAME = exports.MapShoot = exports.MapPoint = exports.MapHeatMap = exports.MapCustom = exports.MapArea = exports.HEAT_MAP_NAME = exports.CUSTOM_NAME = exports.AREA_NAME = void 0;
// import Wmap, { WmapConfig } from "./index";
// import { provinceName } from "./mapData/chinaGeoInfo";
// import * as React from "react";
// class ChildBase {
// parent: Wmap = null;
//
// init (ctx: Wmap, config: WmapConfig, data: ChartData) {
// this.parent = ctx;
// }
//
// changeData(data: ChartData) {}
// }
var AREA_NAME = exports.AREA_NAME = 'MapArea';
var MapArea = exports.MapArea = function MapArea() {
return null;
};
MapArea.displayName = AREA_NAME;
// class Area extends ChildBase {
// init (ctx: Wmap, config: WmapConfig, data: ChartData) {
// super.init(ctx, config, data);
//
// const { chart, ds } = ctx;
//
// const areaMapDataView = ds
// .createView()
// .source(data)
// .transform({
// type: 'map',
// callback(obj) {
// const { name, type, ...others } = obj;
// return {
// // @ts-ignore 将省份全称转化为简称
// name: provinceName[name] ? provinceName[name] : name,
// type: String(type),
// ...others,
// };
// },
// })
// .transform({
// geoDataView: ctx.bgMapDataView,
// field: 'name',
// type: 'geo.region',
// as: ['x', 'y'],
// });
//
// const areaMapView = chart.createView({
// padding: 0,
// });
// areaMapView.data(areaMapDataView.rows);
// /*const areaGeom = */areaMapView
// .polygon()
// .position('x*y')
// // 如果用连续型颜色,需要对数组倒序,否则颜色对应的数值会从小开始
// .color('type', config.areaColors.join('-'))
// // .opacity('value')
// .tooltip('name*value', (name, value) => ({
// name,
// value,
// }));
//
// if (config.geomStyle) {
// // areaGeom.style('name*value', config.geomStyle);
// }
//
// ctx.areaMapDataView = areaMapDataView;
// ctx.areaMapView = areaMapView;
// }
//
// // changeConfig(config) {
// //
// // }
//
// changeData(data: ChartData) {
// const { areaMapDataView } = this.parent;
// if (areaMapDataView.origin !== data) {
// areaMapDataView.source(data);
// }
// }
// }
var POINT_NAME = exports.POINT_NAME = 'MapPoint';
var MapPoint = exports.MapPoint = function MapPoint() {
return null;
};
MapPoint.displayName = POINT_NAME;
var HEAT_MAP_NAME = exports.HEAT_MAP_NAME = 'MapHeatMap';
var MapHeatMap = exports.MapHeatMap = function MapHeatMap() {
return null;
};
MapHeatMap.displayName = HEAT_MAP_NAME;
var SHOOT_NAME = exports.SHOOT_NAME = 'MapShoot';
var MapShoot = exports.MapShoot = function MapShoot() {
return null;
};
MapShoot.displayName = SHOOT_NAME;
var CUSTOM_NAME = exports.CUSTOM_NAME = 'MapCustom';
var MapCustom = exports.MapCustom = function MapCustom() {
return null;
};
MapCustom.displayName = CUSTOM_NAME;
// function reactMapChild(child: Area) {
// return class ReactMapChild extends React.Component<MapChildProps> {
// static displayName = '';
//
//
//
// render(): null {
// return null;
// }
// }
// }