@codervj/graphforge
v2.0.0
Published
GraphForge charting library (jQuery + SVG) with 50+ chart types.
Maintainers
Readme
GraphForge
GraphForge is a production-ready jQuery + SVG charting library with a full SaaS platform (API, dashboard, admin, docs, examples, and CMS). It is intentionally simpler than D3, more extensible than Chart.js, and SaaS-enabled.
Highlights
- 50+ chart types (pie, bar, line, radar, heatmap, treemap, sankey, financial charts, tables, and more)
- One-script include (jQuery plugin)
- SVG renderer with responsive layout
- Plugin system (export, annotations, zoom, streaming)
- SaaS REST API (PHP 8 + MySQL)
- User dashboard + Admin panel + Documentation + Example gallery
- SVG icon library (5000+ icons, categorized)
Quick Start (Library)
Install from npm:
npm install @codervj/graphforge@2Use in browser projects:
<link rel="stylesheet" href="node_modules/@codervj/graphforge/library/graphforge.css" />
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="node_modules/@codervj/graphforge/library/graphforge.min.js"></script><link rel="stylesheet" href="library/graphforge.css" />
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="library/graphforge.js"></script>
<div id="chart" style="height:320px"></div>
<script>
$("#chart").graphforge({
type: "pie",
title: "Market Share",
data: [
{ label: "A", value: 30 },
{ label: "B", value: 70 }
]
});
</script>CDN (via jsDelivr):
<!-- Replace <github-username> with the account hosting this repository. Pin to a tag for stability, e.g. @v2.0.0 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/codervj/graphforge@latest/library/graphforge.css" />
<script src="https://cdn.jsdelivr.net/gh/codervj/graphforge@latest/library/graphforge.min.js"></script>Note: using the library via CDN for client-side charts does not require the SaaS API or a database. To use SaaS features (logging, API-driven chart provisioning, dashboard/admin) you will need to run the optional PHP API and MySQL database described below.
Usage logging (SaaS):
$("#chart").graphforge({
type: "line",
data: [10, 20, 15],
apiKey: "YOUR_API_KEY",
chartId: 123
});Optional SaaS API (PHP 8 + MySQL)
The SaaS API, dashboard, and admin panel are optional. They require a PHP 8 runtime and a MySQL database. If you only need the client-side library served via CDN (jsDelivr), you do not need to run the API or create the database.
- Create database and import schema:
mysql -u root -p graphforge < platform/database/schema.sql
mysql -u root -p graphforge < platform/database/seed.sql- Configure DB credentials in:
platform/services/Database.php
- Run locally:
php -S localhost:8080 -t platformAPI base: http://localhost:8080/api
Dashboards
- User dashboard:
http://localhost:8080/dashboard/user-panel/login/index.html - Admin panel:
http://localhost:8080/admin/admin-dashboard/index.html
Admin seed user:
- Email:
[email protected] - Password:
admin123
Repo Structure
library/bundled JS + CSScore/core enginescharts/chart renderersplugins/chart pluginsicons/SVG icon libraryplatform/PHP SaaS API + dashboard/admindocumentation/docs site contentcode-examples/JS/PHP/Python/React/Go snippets
Debug Mode
GraphForge.debug = true;Enables:
- Render timing logs
- Data parsing logs
- Plugin execution logs
Build Notes
library/graphforge.js is the bundle used in production. The core/, charts/, and plugins/ folders contain the modular source used to build the bundle. For local demos, the bundle is also mirrored in platform/library/.
License
MIT
