Repository navigation
Expand file tree
/
Copy pathPointDensityChart.js
More file actions
51 lines (50 loc) · 1.48 KB
/
Copy pathPointDensityChart.js
File metadata and controls
51 lines (50 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* Created by will on 2016/7/5.
*/
import {NativeModules} from 'react-native';
let PDC = NativeModules.JSPointDensityChart;
import ChartView from './ChartView.js';
/**
* @class PieChart
*/
export default class PointDensityChart extends ChartView{
constructor(){
super();
Object.defineProperty(this,"pointDensityChartId",{
get:function(){
return this.chartviewId
},
set:function(pointDensityChartId){
this.chartviewId = pointDensityChartId;
}
})
}
/**
* 构造方法
* @memberOf PointDensityChart
* @param {MapControl} mapControl
* @returns {Promise.<void>}
*/
async createObj(mapControl){
try{
var {pointDensityChartId} = await PDC.createObj(mapControl._SMMapControlId);
var pointDensityChart = new PointDensityChart();
pointDensityChart.pointDensityChartId = pointDensityChartId;
return pointDensityChart;
}catch(e){
console.error(e);
}
}
/**
* 设置刻度调色板
* @memberOf GridHotChart
* @returns {Promise.<void>}
*/
async setColorScheme(scheme){
try{
await PDC.setColorScheme(this.pointDensityChartId,scheme.colorSchemeId);
}catch(e){
console.error(e);
}
}
}