Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@patternfly-java/charts

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly-java/charts

Web Components wrapper around PatternFly React Charts

Source
npmnpm
Version
0.8.3
Version published
Weekly downloads
336
460%
Maintainers
1
Weekly downloads
 
Created
Source

PatternFly Java Charts

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.

Available charts

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>ChartPie

Installation

Install the package using npm:

npm install @patternfly-java/charts

Import it in your JavaScript file:

import "@patternfly-java/charts/dist/charts";

Usage

<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>

Keywords

java

FAQs

Package last updated on 20 May 2026

Did you know?

Socket

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.

Install

Related posts