
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@patternfly-java/charts
Advanced tools
This package contains a subset of the PatternFly React Charts wrapped as web components.
The package is a prerequisite if you want to use charts in PatternFly Java, but can also be used independently.
The following web components are available:
<pfj-chart-donut> → ChartDonut<pfj-chart-donut-threshold> → ChartDonutThreshold<pfj-chart-donut-utilization> → ChartDonutUtilization<pfj-chart-bullet> → ChartBullet<pfj-chart-pie> → ChartPieInstall the package using npm:
npm install @patternfly-java/charts
Import it in your JavaScript file:
import "@patternfly-java/charts/dist/charts";
<pfj-chart-donut
id="chart-donut-0"
width="300"
height="300"
title="Pets"
sub-title="Count"
></pfj-chart-donut>
<pfj-chart-donut-utilization
width="300"
height="300"
title="60%"
sub-title="Utilization"
data='{"x":"Storage","y":60}'
></pfj-chart-donut-utilization>
<pfj-chart-donut-threshold
aria-desc="Storage capacity"
aria-title="Donut utilization chart with static threshold example"
constrain-to-visible-area
data='[{"x":"Warning at 60%","y":60},{"x":"Danger at 90%","y":90}]'
width="300"
height="300"
>
<pfj-chart-donut-utilization
id="chart-donut-utilization-0"
sub-title="of 100 GBps"
title="0%"
thresholds='[{"value": 60}, {"value": 90}]'
></pfj-chart-donut-utilization>
</pfj-chart-donut-threshold>
<script type="module">
const cd = document.getElementById('chart-donut-0');
cd.data = [
{x: 'Cats', y: 25},
{x: 'Dogs', y: 55},
{x: 'Birds', y: 20}
];
cd.labels = ({datum}) => `${datum.x}: ${datum.y}%`;
const cdu = document.getElementById('chart-donut-utilization-0');
cdu.data = {x: 'Storage capacity', y: 0};
setInterval(() => {
let previous = cdu.data.y;
let current = (previous + 10) % 100;
cdu.data = {x: 'Storage capacity', y: current};
cdu.title = `${current}%`;
cdu.subTitle = `${current} of 100 GBps`;
}, 1000);
</script>
FAQs
Web Components wrapper around PatternFly React Charts
The npm package @patternfly-java/charts receives a total of 319 weekly downloads. As such, @patternfly-java/charts popularity was classified as not popular.
We found that @patternfly-java/charts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.