How to use the @patternfly/react-charts.ChartThemeColor.green function in @patternfly/react-charts

To help you get started, we’ve selected a few @patternfly/react-charts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patternfly / patternfly-react / packages / patternfly-4 / react-integration / demo-app-ts / src / components / demos / DonutUtilizationChartDemo / DonutUtilizationSimpleRightGreenDemo.tsx View on Github external
constrainToVisibleArea
            data={{ x: 'Storage capacity', y: used }}
            height={300}
            labels={({ datum }) => (datum.x ? `${datum.x}: ${datum.y}%` : null)}
            legendData={[{ name: `Storage capacity: ${spacer}${used}%` }, { name: 'Unused' }]}
            legendOrientation="vertical"
            legendPosition="bottom"
            padding={{
              bottom: 75, // Adjusted to accommodate legend
              left: 8,
              right: 8,
              top: 8
            }}
            subTitle="of 100 GBps"
            title={`${used}%`}
            themeColor={ChartThemeColor.green}
            themeVariant={ChartThemeVariant.light}
            thresholds={[{ value: 60 }, { value: 90 }]}
            width={230}
          />
        
      
    );
  }
}
github openshift / console / frontend / public / components / graphs / gauge.tsx View on Github external
export const GaugeChart: React.FC = ({
  data,
  error,
  humanize = humanizePercentage,
  invert = false,
  loading,
  query = '',
  remainderLabel = 'available',
  themeColor = ChartThemeColor.green,
  thresholds = DEFAULT_THRESHOLDS,
  title,
  usedLabel = 'used',
  // Don't sort, Uses previously declared props
  label = data ? humanize(data.y).string : 'No Data',
  secondaryTitle = usedLabel,
  className,
}) => {
  const [ref, width] = useRefWidth();
  const ready = !error && !loading;
  const status = loading ? 'Loading' : error;
  const labels = ({ datum: { x, y }}) => x ? `${x} ${usedLabel}` : `${y} ${remainderLabel}`;
  return (
github patternfly / patternfly-react / packages / patternfly-4 / react-integration / demo-app-ts / src / components / demos / LineChartDemo / LineChartGreenDemo.tsx View on Github external
legendData={[
              { name: 'Cats' },
              { name: 'Dogs', symbol: { type: 'dash' } },
              { name: 'Birds' },
              { name: 'Mice' }
            ]}
            legendOrientation="vertical"
            legendPosition="right"
            height={250}
            padding={{
              bottom: 50,
              left: 50,
              right: 200, // Adjusted to accommodate legend
              top: 50
            }}
            themeColor={ChartThemeColor.green}
            width={600}
          >
github apache / qpid-dispatch / console / react / src / overview / dashboard / inflightChart.js View on Github external
constructor(props) {
    super(props);
    this.title = "Deliveries in flight";
    this.color = d3.rgb(ChartThemeColor.green);
    this.setStyle(this.color, 0.3);
    this.isRate = false;
    this.ariaLabel = "inflight-chart";
  }
github patternfly / patternfly-react / packages / patternfly-4 / react-integration / demo-app-ts / src / components / demos / DonutUtilizationChartDemo / DonutUtilizationGreenStaticRightDemo.tsx View on Github external
labels={({ datum }) => (datum.x ? datum.x : null)}
            legendPosition="bottom"
            width={230}
          >
             (datum.x ? `${datum.x}: ${datum.y}%` : null)}
              legendData={[
                { name: `Storage capacity: ${used}%` },
                { name: 'Warning threshold at 60%' },
                { name: 'Danger threshold at 90%' }
              ]}
              legendOrientation="vertical"
              subTitle="of 100 GBps"
              title={`${used}%`}
              themeColor={ChartThemeColor.green}
              themeVariant={ChartThemeVariant.light}
              thresholds={[{ value: 60 }, { value: 90 }]}
            />
          
        
      
    );
  }
}