Skip to content

Commit 31c5cc1

Browse files
jkotovakeydunov
andauthored
example: highcharts (#809)
* example: highcharts * example: highcharts+mapbox credits * examples: highcharts * examples: highcharts * examples: highcharts * examples: highcharts * examples: highcharts * examples: highcharts pie do not use unnecessary state * examples: highcharts enable websockets * examples: highcharts small fixes Co-authored-by: Artyom Keydunov <[email protected]>
1 parent 9b1f338 commit 31c5cc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+17284
-2
lines changed

examples/highcharts/.cubecloud

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"url":"https://examples.cubecloud.dev","deploymentId":30}

examples/highcharts/.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CUBEJS_API_SECRET=SECRET
2+
CUBEJS_DB_TYPE=postgres
3+
CUBEJS_DB_HOST=localhost
4+
CUBEJS_DB_NAME=ecom
5+
CUBEJS_WEB_SOCKETS=true

examples/highcharts/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env.local
2+
node_modules

examples/highcharts/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Example of an e-commerce dashboard with Cube.js, React and Highcharts
2+
3+
The analytics dashboard with [Highcharts](https://www.highcharts.com/) and React.
4+
You can find [the live demo here.](https://highcharts.cubecloudapp.dev/)
5+
6+
Here you can find usage of:
7+
8+
- [Highcharts API](https://www.highcharts.com/blog/products/highcharts/)
9+
- [Highcharts Maps](https://www.highcharts.com/products/maps/)
10+
- [Highcharts Stock](https://www.highcharts.com/products/stock/)
11+
- dynamic data loading based on the app's state
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "dashboard-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@ant-design/compatible": "^1.0.4",
7+
"@ant-design/icons": "^4.2.1",
8+
"@apollo/react-hooks": "^3.1.5",
9+
"@cubejs-client/core": "^0.19.47",
10+
"@cubejs-client/react": "^0.19.47",
11+
"@cubejs-client/ws-transport": "^0.19.43",
12+
"@highcharts/map-collection": "^1.1.3",
13+
"@testing-library/jest-dom": "^4.2.4",
14+
"@testing-library/react": "^9.3.2",
15+
"@testing-library/user-event": "^7.1.2",
16+
"antd": "^4.4.1",
17+
"apollo-cache-inmemory": "^1.6.6",
18+
"apollo-client": "^2.6.10",
19+
"apollo-link-schema": "^1.2.5",
20+
"chart.js": "^2.9.3",
21+
"graphql": "^15.3.0",
22+
"graphql-tag": "^2.10.3",
23+
"graphql-tools": "^5.0.0",
24+
"highcharts": "^8.1.2",
25+
"highcharts-react-official": "^3.0.0",
26+
"moment": "^2.27.0",
27+
"prop-types": "^15.7.2",
28+
"react": "^16.13.1",
29+
"react-beautiful-dnd": "^13.0.0",
30+
"react-chartjs-2": "^2.9.0",
31+
"react-dom": "^16.13.1",
32+
"react-grid-layout": "^0.18.3",
33+
"react-resizable": "^1.10.1",
34+
"react-router": "^5.2.0",
35+
"react-router-dom": "^5.2.0",
36+
"react-scripts": "3.4.1"
37+
},
38+
"scripts": {
39+
"start": "react-scripts start",
40+
"build": "react-scripts build",
41+
"test": "react-scripts test",
42+
"eject": "react-scripts eject"
43+
},
44+
"eslintConfig": {
45+
"extends": "react-app"
46+
},
47+
"browserslist": {
48+
"production": [
49+
">0.2%",
50+
"not dead",
51+
"not op_mini all"
52+
],
53+
"development": [
54+
"last 1 chrome version",
55+
"last 1 firefox version",
56+
"last 1 safari version"
57+
]
58+
},
59+
"cubejsTemplates": {
60+
"create-react-app": "0.0.1",
61+
"react-antd-dynamic": "0.0.2",
62+
"credentials": "0.0.1",
63+
"chartjs-charts": "0.0.1",
64+
"antd-tables": "0.0.1"
65+
}
66+
}
944 Bytes
Loading
4.19 KB
Binary file not shown.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>Cube.js Highcharts example</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>
3.88 KB
Loading

0 commit comments

Comments
 (0)