https://github.com/concaption/flask-charts-js
https://github.com/concaption/flask-charts-js
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/concaption/flask-charts-js
- Owner: concaption
- License: mit
- Created: 2023-12-14T13:37:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T13:47:56.000Z (over 2 years ago)
- Last Synced: 2025-02-08T19:45:05.881Z (about 1 year ago)
- Language: JavaScript
- Size: 387 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Flask RESTX and ChartJS
This project is an example of how to implement charts using Flask/RestX as a backend server, ChartJS for charting, and Bootstrap 5 for styling.

## Project Structure
```
.gitattributes
.gitignore
LICENSE.md
README.md
api.py
app.py
data/
monthly_customers.csv
monthly_sales.csv
product_sales.csv
data_loader.py
models.py
requirements.txt
static/
js/
custom.js
templates/
index.html
```
## How to Run
1. Install the required packages from `requirements.txt`:
```sh
pip install -r requirements.txt
```
2. Run the Flask application:
```sh
python app.py
```
The application will be available at `http://localhost:5000`.
## API Endpoints
The application provides the following API endpoints:
- `/api/MonthlyCustomers`: Returns monthly customer data.
- `/api/MonthlySales`: Returns monthly sales data.
- `/api/ProductSales`: Returns product sales data.
These endpoints are used in the `custom.js` file to fetch data and display charts on the index page.
## License
This project is licensed under the MIT License. See the `LICENSE.md` file for details.