FAQ - wrathtafarian/js-charts GitHub Wiki

โ“ Frequently Asked Questions (FAQ)

Welcome to the FAQ page! Here you'll find answers to the most common questions about js-charts.


๐Ÿ’ก General

๐Ÿ‘‰ What is js-charts?

js-charts is a low-code charting and graphing solution. Charts are defined as HTML elements which are parsed and rendered into charts.

๐Ÿ‘‰ Who is this project for?

This project is for anyone wishing to add high-quality charts to their website, presentation or documentation without having to write any code.


โš™๏ธ Customization

๐Ÿฆถ How do I change the copyright text displayed in a chart's footer?

The copyright text that appears in a chart's footer can be customized in two ways:

  1. Change the value in the IDEFAULT_DESIGN_TEMPLATES constant in the js/js-chart-common.js file. The IDEFAULT_DESIGN_TEMPLATES constant is an array containing multiple style templates. Change the value of the footer_inner_text element in every style template in the array.
  2. The copyright text can also be adjusted on a chart-by-chart basis using the js-footer-inner-text style directive. Specify the new copyright text by including the js-footer-inner-text directive in the chart container. Refer to the Style Directives page for detailed instuctions on how to customize a chart using style directives.

๐ŸŽจ I cannot specify custom colors using the js-color-palette style directive. Why is my chart completely white, black or transparent?

Due to certain color formats that use the comma character, the color palette list must always be separated by a semi-color character. As demonstrated below, different color formats can be mixed inside one js-color-palette style directive container, but each color must be separated with a semi-colon character.

<div class="js-color-palette">#ffa500; rgb(62, 88, 121); rgb(33, 53, 85, 0.5); hsl(199, 31%, 55%); hsla(182, 25%, 40%, 0.6); Brown</div>

Failing the use a semi-colon character as separator for the js-color-palette directive may result in either a complete black, white or transparent chart.


๐Ÿท๏ธ Data Labels

๐Ÿท๏ธ How do I prepend or append text to the data label values?

โš™๏ธ Installation

๐Ÿ‘‰ Are there any system requirements?

Not really. Charts are rendered using CSS and JS, which are supported by all modern browsers on all major platforms.


๐Ÿš€ Usage

๐Ÿงฑ Step 1: Clone the Repository

git clone https://github.com/wrathtafarian/js-charts.git
cd js-charts

๐Ÿš€ Step 2: Run the Project

Open one of the example .htm files included in the /examples/ folder in the repository.

Visit in example page your browser:

file:///C:/js-charts/poc-pie-light.htm

Start playing around with different chart types.


โœ… You're Ready!

Your project should now be up and running. Start building, exploring, or contributing!


๐Ÿงช Testing & Debugging

๐Ÿ‘‰ How do I run tests?

npm test
# or
pytest

See the Testing & Debugging guide for more info.

๐Ÿ‘‰ How do I enable debug mode?

Set the environment variable:

export DEBUG=true

Or pass the --debug flag when running the app.


๐Ÿ™‹โ€โ™€๏ธ Contributing

๐Ÿ‘‰ How can I contribute?

Check out the Contributing Guide for steps on how to fork, branch, make changes, and open a pull request.


๐Ÿ”’ Security & Privacy

๐Ÿ‘‰ How do I report a security vulnerability or privacy breach?

  • Do not open a public issue.
  • Please email us directly at: [email protected]
  • ๐Ÿ•ต๏ธ We take the security and privacy of all of our users very seriously and will respond as quickly as we can.

๐Ÿ“ฌ Still have questions?

โš ๏ธ **GitHub.com Fallback** โš ๏ธ