### Install billboard.js and React Component Source: https://github.com/naver/billboard.js/blob/master/packages/react/README.md Install billboard.js and the @billboard.js/react component using pnpm. This is a prerequisite for using the component. ```bash # Install billboard.js together if you don't have it already $ pnpm add billboard.js @billboard.js/react ``` -------------------------------- ### Install Release Candidate Version Source: https://github.com/naver/billboard.js/blob/master/README.md To install the 'release candidate' build, which precedes the latest official release, use the pnpm add command with the '@next' tag. ```bash $ pnpm add billboard.js@next ``` -------------------------------- ### UMD/CDN Usage Example Source: https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md When using the UMD build via CDN, all resolvers are auto-invoked at load time. This means methods like chart.xgrids() work out of the box without extra setup. ```html ``` -------------------------------- ### Install billboard.js Locally Source: https://github.com/naver/billboard.js/wiki/How-to-load-as-ESM-directly-from-the-browser? Install billboard.js using npm. This command installs the package and its dependencies into your local node_modules directory. ```sh npm i billboard.js ``` -------------------------------- ### Install Puppeteer Source: https://github.com/naver/billboard.js/wiki/How-to-generate-chart-image-in-Node.js-environment? Install the Puppeteer package as a development dependency. ```sh npm i puppeteer --save-dev ``` -------------------------------- ### Plugin Development Commands Source: https://github.com/naver/billboard.js/wiki/Plugin-Interface Lists the npm commands for facilitating plugin development: `npm run start:plugin` to start the development server and `npm run build:plugin` to build the plugin. ```bash # Running below command will facilitate on plugin development # start dev-server $ npm run start:plugin # build plugin $ npm run build:plugin ``` -------------------------------- ### Install Nightly Version via pnpm Source: https://github.com/naver/billboard.js/blob/master/README.md Alternatively, you can install the nightly version directly from the GitHub repository using the pnpm add command with the specified branch. ```bash $ pnpm add git+https://github.com/naver/billboard.js.git#nightly ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/naver/billboard.js/blob/master/DEVELOPMENT.md Install all necessary dependency modules for billboard.js development using pnpm. This step is crucial after cloning the repository. ```bash # Install the dependency modules. $ pnpm install ``` -------------------------------- ### Complete HTML Structure for ESM Billboard.js Source: https://github.com/naver/billboard.js/wiki/How-to-load-as-ESM-directly-from-the-browser? This is a full HTML example demonstrating how to set up an import map for billboard.js and its dependencies, and then generate a chart using ESM. ```html billboard.js
``` -------------------------------- ### Install Billboard.js with pnpm Source: https://github.com/naver/billboard.js/blob/master/README.md The standard way to install the latest stable version of Billboard.js using pnpm is by running the 'pnpm add billboard.js' command. ```bash $ pnpm add billboard.js ``` -------------------------------- ### Build billboard.js Source: https://github.com/naver/billboard.js/blob/master/DEVELOPMENT.md Utilize package scripts to build billboard.js for development or production. This includes starting a development server, generating a production build, and creating JSDoc documentation. ```bash # Run webpack-dev-server for development $ pnpm start # Build $ pnpm run build # Generate jsdoc $ pnpm run jsdoc ``` -------------------------------- ### Usage Example 2: Bar and Area Chart Source: https://github.com/naver/billboard.js/wiki/How-to-generate-chart-image-in-Node.js-environment? This example demonstrates generating a bar and area chart and saving it as 'chart02.png'. Ensure 'transition.duration' is set to 0 to prevent rendering issues. ```js await screenshot({ data: { columns: [ ["data1", 300, 350, 300, 0, 0, 0], ["data2", 130, 100, 140, 200, 150, 50] ], types: { data1: "bar", data2: "area" } }, transition: { duration: 0 } }, "./chart02.png"); ``` -------------------------------- ### Usage Example 1: Area Chart Source: https://github.com/naver/billboard.js/wiki/How-to-generate-chart-image-in-Node.js-environment? This example demonstrates generating an area step and area spline chart and saving it as 'chart01.png'. Ensure 'transition.duration' is set to 0 to prevent rendering issues. ```js // index.mjs import screenshot from "./screen.mjs"; await screenshot({ data: { columns: [ ["data1", 300, 350, 300, 0, 0, 0], ["data2", 130, 100, 140, 200, 150, 50] ], types: { data1: "area-step", data2: "area-spline" } }, // IMPORTANT: // Specify 'transition.duration=0' to avoid partial rendering // caused by the transition(animation). transition: { duration: 0 } }, "./chart01.png"); ``` -------------------------------- ### Conventional Commits Body Example Source: https://github.com/naver/billboard.js/blob/master/CONTRIBUTING.md An example of a commit message that includes a body, detailing the changes made. It also shows how to indicate a breaking change. ```bash (): Update condition of tick to avoid unnecessary tick rendering