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

@overture-stack/arranger-charts

v0.0.1-beta.11

Published

A React chart library for visualizing Arranger aggregation.

Downloads

89

Readme

Arranger Charts

A React chart library for visualizing Arranger aggregation.

Installation

npm i @overture-stack/arranger-charts

Quick Start

Wrap a charts in required providers: ArrangerDataProvider,ChartsProvider and ChartsThemeProvider. Chart component is responsive to parent containers dimensions.

import { ChartsProvider, ChartsThemeProvider, BarChart, SunburstChart } from '@overture-stack/arranger-charts';

function App() {
	return (
		<ArrangerDataProvider {...arrangerConfig}>
			<ChartsProvider>
				<ChartsThemeProvider>
					<div height="200px">
						<BarChart
							fieldName="gender"
							maxBars={10}
							handlers={{ onClick: (data) => console.log(data) }}
						/>
					</div>
				</ChartsThemeProvider>
			</ChartsProvider>
		</ArrangerDataProvider>
	);
}

Dependencies

Arranger Charts requires an ArrangerDataProvider from @overture-stack/arranger-components as a parent component to handle data fetching and SQON state management.

Components

ChartsProvider

The main provider that manages chart registration, data fetching, and coordinates multiple charts.

Props:

  • debugMode (boolean): Enable verbose logging for development
  • loadingDelay (number): Delay network results by milliseconds

ChartsThemeProvider

Provides theme configuration and custom components to all child charts. You can nest multiple under a single .

Props:

  • colors (string[]): Array of hex colors for chart theming
  • components: Custom fallback components
    • Loader: Custom loading component
    • ErrorData: Custom error component
    • EmptyData: Custom empty state component
<ChartsThemeProvider
	colors={['#ff6b6b', '#4ecdc4', '#45b7d1']}
	components={{
		Loader: CustomSpinner,
		ErrorData: CustomError,
		EmptyData: NoDataMessage,
	}}
>
	{/* Charts */}
</ChartsThemeProvider>

BarChart

Renders horizontal bar charts for aggregation data.

Props:

  • fieldName (string, required): GraphQL field name to visualize
  • maxBars (number, required): Maximum number of bars to display
  • ranges (Range[]): For numeric fields, specify value ranges
  • handlers: Event handlers
    • onClick: Callback when clicking a bar segment
  • theme: Chart configuration
    • sortByKey: Array of keys to define custom sort order. Important to account for all values e.g., ['Male', 'Female', '__missing__']
<BarChart
	fieldName="primary_site"
	maxBars={15}
	theme={{
		sortByKey: ['Brain', 'Lung', 'Breast', '__missing__'],
	}}
	handlers={{
		onClick: (data) => {
			console.log('Clicked', data.label, data.value);
		},
	}}
/>

SunburstChart

Creates sunburst chart showing relationships between broad and specific categories.

Props:

  • fieldName (string, required): GraphQL field name to visualize
  • maxSegments (number, required): Maximum number of segments to display
  • mapper (function, required): Maps outer ring values to inner ring categories
  • handlers: Event handlers
    • onClick: Callback when clicking a segment
  • theme: Chart configuration options
<SunburstChart
	fieldName="primary_diagnosis"
	maxSegments={12}
	mapper={(diagnosisCode) => {
		// Map specific diagnosis codes to broader categories
		if (diagnosisCode.startsWith('C78')) return 'Metastatic';
		if (diagnosisCode.startsWith('C50')) return 'Breast Cancer';
		return 'Other';
	}}
	handlers={{
		onClick: (data) => {
			console.log('Selected category:', data);
		},
	}}
/>

Field Types

Charts automatically detect field types from Arranger's extended mapping:

  • Aggregations: Categorical fields
  • NumericAggregations: Numeric fields that require range specifications

For numeric fields, provide ranges:

<BarChart
	fieldName="age_at_diagnosis"
	ranges={[
		{ key: '0-18', from: 0, to: 18 },
		{ key: '19-65', from: 19, to: 65 },
		{ key: '65+', from: 65 },
	]}
	maxBars={10}
/>

Development

Local Development

# Install dependencies
npm install

# Build and watch for changes
npm run dev

To ensure all code is using the same Arranger contexts, also npm i to the the consumer projects @overture-stack/arranger-components dependency.

npm i <shared instance of node_modules @overture-stack/arranger-components in consumer project>

From consumer project:

npm i <path to  @overture-stack/arranger-charts>

Debug Mode

Enable verbose logging by setting the debugMode prop on ChartsProvider.