jgeraigery / visa-chart-components

Visa Chart Components (VCC) is an accessibility focused, framework agnostic set of data experience design systems components for the web. VCC attempts to provide a toolset to enable developers to build equal data experiences for everyone, everywhere.
https://visa.github.io/visa-chart-components/
MIT License
0 stars 0 forks source link

Visa Chart Components

Image showing three examples of Visa Chart Components for demonstration purposes only.

Visa Chart Components (VCC) is an accessibility focused, framework agnostic set of data experience design systems components for the web. VCC attempts to provide a toolset to enable developers to build equal data experiences for everyone, everywhere.

Visa Chart Components (VCC) is provided under the MIT license.


Installation Process:

To use VCC in your projects run yarn add @visa/charts, or you can also install a single component by running yarn add @visa/bar-chart. We recommend leveraging bundles if you are going to install three (3) or more specific components for your project.

While we do deliver React (@visa/charts-react) and Angular (@visa/charts-angular) bundles, VCC components are compiled to standard web components within (@visa/charts), leveraging Stencil.js and can be reused directly in many web environments and/or frameworks.

Bundles

Components with Ready status

Our utilities can also be leveraged directly


Development

VCC is built as a monorepo containing a set of packages. These packages include specific chart components (e.g., @visa/bar-chart), our utilities (e.g., @visa/visa-charts-utils) as well as component bundles (e.g., @visa/charts or @visa/charts-react).

Steps to get up and running for development

note: the initial install and build process can take some time.


Single component development

For development work on a single component, we launch local stencil applications, which allow for faster development iterations and features like hot reloading. To run a single component development environment run the below command. Note: these local/dev applications are not included in our builds.

yarn dev --ibsw=@visa/<component-name>

The switches in the command relate to:

You can run --ibsw, --bsw, or --sw if you need to. You can also build packages together (once installed) using commands like:

yarn build --scope=@visa/visa-charts-utils && yarn build --scope=@visa/bar-chart

This can helpful if you are making changes to dependencies of the chart component, for example, our utilities package.


Running unit tests

We have built extensive unit testing out for some of our components and are working towards propagating this across the rest. To run unit tests the command is:

Also, in some cases, component snapshots may need to be updated after changes have been implemented on components themselves (take caution when updating testing snapshots). In this situation, run the update snapshot command as follows:

yarn dev --updateSnapshot=@visa/<component-name>

Once you have finished running your tests you can leverage the below scripts to evaluate them:

We use vscode as our development environment, you can also leverage the built in debugging capability in this tool to evaluate the unit tests themselves.


Running components through yarn audit / dependency check

We enable a repo wide scan using yarn audit to check for known dependency vulnerabilities. To run the audit command(s):

Once you have finished running your audit you can leverage the below scripts to evaluate the results:


Cleaning the repo

caution: this will require you to re-install the entire monorepo, which can take some time

To clean repo we have clean command with options

yarn dev --c=<options>

Here, <options> can be

ALL-- deletes all lock files, node_modules and build folders.

LOCK-- deletes only lock files.

BUILD-- deletes only build folders and files.

NODE-- deletes only node_modules folder across repo.


Credits

You can find license information for all dependencies included in our build here. Below is a list of key dependencies.

This project was/is built with tireless efforts from: