-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.js
More file actions
85 lines (81 loc) · 1.71 KB
/
App.js
File metadata and controls
85 lines (81 loc) · 1.71 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import React from 'react';
import { StyleSheet, View } from 'react-native';
import HighchartsReactNative from '@highcharts/highcharts-react-native'
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
chartOptions: {
chart: {
type: 'scatter3d',
options3d: {
enabled: true,
alpha: 20,
beta: 30,
depth: 200,
viewDistance: 10,
frame: {
bottom: {
size: 1,
color: 'rgba(0,0,0,0.05)'
}
}
}
},
title: {
text: 'a 3D Scatter Chart'
},
subtitle: {
text: 'using x y z coordinates'
},
yAxis: {
min: 0,
max: 10
},
xAxis: {
min: 0,
max: 10,
gridLineWidth: 1
},
zAxis: {
min: 0,
max: 10,
showFirstLabel: false
},
series: [{
data: [
// [X, Y, Z]
[1, 1, 1],
[1, 1, 2],
[1, 1, 5],
[2, 3, 2],
[2, 6, 4],
[4, 5, 7],
[4, 2, 8],
[7, 1, 3],
[7, 1, 5],
[8, 1, 5]
]
}]
}
};
}
render() {
return (
<View style={styles.container}>
<HighchartsReactNative
styles={styles.container}
options={this.state.chartOptions}
modules={['highcharts-3d']}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#fff',
justifyContent: 'center',
flex: 1
}
});