https://github.com/tsmx/charts-test
Serving a HighChart or ChartJS chart on a web page populated with data from a REST-endpoint using Express.
https://github.com/tsmx/charts-test
chart chartjs express highcharts website
Last synced: over 1 year ago
JSON representation
Serving a HighChart or ChartJS chart on a web page populated with data from a REST-endpoint using Express.
- Host: GitHub
- URL: https://github.com/tsmx/charts-test
- Owner: tsmx
- License: mit
- Created: 2019-01-07T18:55:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-30T20:20:46.000Z (over 1 year ago)
- Last Synced: 2025-01-11T19:24:00.014Z (over 1 year ago)
- Topics: chart, chartjs, express, highcharts, website
- Language: HTML
- Homepage:
- Size: 619 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# charts-test
> Example how to show a HighCharts or ChartJS chart on a web pages populated with data from a Express backend.
## Usage
Starting the project, three GET routes will be set up under `localhost:3000`.
```bash
http://localhost:3000/
|
+-- testdata/ --> serving JSON test data
|
+-- highchart/ --> serving a web page with a HighChart chart
|
+-- chartjs/ --> serving a web page with a ChartJS chart
```
## Implementation
The population of the charts is implemented with AJAX requests to the `testdata/` endpoint using jQuery. For the sake of simplicity in this example project, the concrete implementation of that is located directly in the wegpages under
- `static/highchart.html` for the HighCharts example
- `static/chartjs.html` for the ChartJS example
Refer to this files for more details.