Installation Guide - wrathtafarian/js-charts GitHub Wiki
Welcome! This page will walk you through the steps to get js-charts running on your system.
🛠️ This guide assumes basic familiarity with HTML.
git clone https://github.com/wrathtafarian/js-charts.git
cd js-charts
Open one of the example files included in the root of the repository.
Visit in your browser:
file:///C:/js-charts/poc-pie-light.htm
Start playing around with different chart types.
Refer to the Chart Attributes Reference or Style Directives Reference pages for more information on how to customise your new charts.
-
❌ Nothing happens when I open an example page
Try reloading the page. If the problem persists:- Ensure that the CSS and JS files are accessible to the HTML example page. Right-click on the page and select view source.
- Within the
<head></head>
section of the document, right-click each linked stylesheet and JS library and open each document in a new window. - Review each new window. Ensure the source of every stylesheet or JS library loads in the new window.
- If you receive a HTTP 404 Not Found, update the source code of the example page.
- Point each linked stylesheet and JS library to the correct location locally, e.g.
<script type="text/javascript" src="/latest/js/js-chart-common.js"></script>
.
- Point each linked stylesheet and JS library to the correct location locally, e.g.
- If you receive HTTP 401 Unauthorized, ensure that you have permission to read from the
/css/
and/js/
folders.
-
❌ Nothing happens when I open an example page
- On web pages with heavy load, or on systems with low memory, the DOM may take a long time to load in the browser before the chart can be rendered.
- Try reloading the page.
- If the problem persists, delay the call to render the chart with a few miliseconds after the DOM has rendered. To do this:
- Open
js/js-chart-common.js
in a code editor. - At the bottom of
/js/js-chart-common.js
, increase the timeout that initiates theinitChart()
from200
to a higher value. - For example,
setTimeout(initChart, 300);
- This will allow the DOM extra time to load before the chart is rendered.
- Open
If you run into issues, check out the FAQ or open an issue on GitHub.
Want to help? Please see our Contributing Guide to learn how you can contribute.