npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@devexperts/dxcharts-lite

v2.7.22

Published

DXCharts Lite

Downloads

30,223

Readme

Overview

Get started with DXCharts Lite by installing the library and configuring it to your needs.

Quick-start

Installation

Install the library in your project:

npm install @devexperts/dxcharts-lite

Your package.json after installation:

"dependencies": {
	"@devexperts/dxcharts-lite": "1.0.0",
	...
}

Create chart

If you use webpack or another bundler, import the createChart method and pass the element where the chart will be rendered as the first argument.

export const createChartInstance = () => {
	const container = document.getElementById('chart_container');
	const chartInstance = DXChart.createChart(container);
	return chartInstance;
};

The createChart method creates a new chart instance using ChartBootstrap class and returns it.

It accepts two parameters:

  • element: The HTML element where the chart will be rendered.
  • config (optional): An instance of ChartConfig.

Note: Set width: 100% and height: 100% for the parent container. By default, the chart auto-resizes to the parent, but you can change this by setting fixedSize in the config.

You should now see an empty chart on the screen.

Set data

To display data (e.g. Candles), you can use the bundled function to generate mock data. Import generateCandlesData and use it to generate candles.

export const generateMockData = () => {
	const candles = generateCandlesData();
	chart.setData({ candles });
};

You should now see a basic chart like the image below:

HTML-markup

Here is complete quick-start code example:

<html>
	<head>
		<script src="https://www.unpkg.com/@devexperts/[email protected]/dist/dxchart.min.js"></script>
		<script type="importmap">
			{
				"imports": {
					"@devexperts/dxcharts-lite/": "https://www.unpkg.com/@devexperts/[email protected]/"
				}
			}
		</script>
	</head>
	<body>
		<div id="chart_container"></div>
	</body>
	<script type="module">
		import generateCandlesData from '@devexperts/dxcharts-lite/dist/chart/utils/candles-generator.utils';

		// create chart instance, pass parent container as 1st argument
		const container = document.getElementById('chart_container');
		const chart = DXChart.createChart(container);
		// create and set candles data
		const candles = generateCandlesData();
		chart.setData({ candles });
	</script>
</html>

Configuration

You can configure the chart using a ChartConfig object (optional).

ChartConfig sets the initial properties for the chart instance. Below is a table of available options (see documentation for details).

API

Each chart component has an API that allows you to change many parameters on the fly, modify appearance at runtime, and subscribe to various chart events (such as hovering over a candle).

Main components include:

Examples

We have created many examples with different chart configurations. You can find them here.

Demo

To demonstrate its capabilities, we've created a Demo version based on DXCharts Lite. Explore the full power of our library!