How to use the @patternfly/react-charts.ChartThemeColor.blue 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 openshift / console / frontend / public / components / graphs / bar.tsx View on Github external
export const BarChart: React.FC = ({
  barWidth = DEFAULT_BAR_WIDTH,
  title,
  query,
  data = [],
  theme = getCustomTheme(ChartThemeColor.blue, ChartThemeVariant.light, barTheme),
  titleClassName,
  loading = false,
  LabelComponent,
}) => {
  const [containerRef, width] = useRefWidth();

  // Max space that horizontal padding should take up. By default, 2/3 of the horizontal space is always available for the actual bar graph.
  const maxHorizontalPadding = PADDING_RATIO * width;

  const padding = {
    bottom: 15,
    left: 0,
    right: Math.min(100, maxHorizontalPadding),
    top: 0,
  };
github openshift / console / frontend / public / components / graphs / area.tsx View on Github external
export const AreaChart: React.FC = ({
  className,
  data,
  formatDate = twentyFourHourTime,
  height = DEFAULT_HEIGHT,
  humanize = humanizeNumber,
  loading = true,
  padding,
  query,
  theme = getCustomTheme(ChartThemeColor.blue, ChartThemeVariant.light, areaTheme),
  tickCount = DEFAULT_TICK_COUNT,
  title,
  xAxis = true,
  yAxis = true,
}) => {
  const [containerRef, width] = useRefWidth();
  const getLabel = ({ datum: { x, y }}) => `${humanize(y).string} at ${formatDate(x)}`;
  const container = ;
  return (
    
      {data.length ? (