agentsclimarketplace

Area chart

Skill reaviz/skills/reaviz/charts/area-chart

AI Skills for Reaviz Projects

Install
npx -y skills add reaviz/skills --skill area-chart

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.4 KB, as published. Nobody here has run it

AreaChart

Area chart with gradient fill, line, and data points. Supports single series, grouped multi-series, stacked, and stacked-normalized variants.

Import

import {
  AreaChart,
  AreaSeries,
  Area,
  Line,
  PointSeries,
  StackedAreaChart,
  StackedAreaSeries,
  StackedNormalizedAreaChart,
  StackedNormalizedAreaSeries
} from 'reaviz';

AreaChart Props

PropTypeDefaultDescription
dataChartDataShape[][]Chart data
widthnumberautoWidth in pixels
heightnumberautoHeight in pixels
marginsMarginsChart margins
seriesReactElement<AreaSeriesProps><AreaSeries />Series component
xAxisReactElement<LinearAxisProps><LinearXAxis type="time" />X axis component
yAxisReactElement<LinearAxisProps><LinearYAxis type="value" />Y axis component
gridlinesReactElement | null<GridlineSeries />Gridlines (null to hide)
brushReactElement | nullnullBrush selection component
zoomPanReactElement | nullnullZoom/pan component
secondaryAxisReactElement[]Additional axis components
classNamestringSVG CSS class
containerClassNamestringContainer div CSS class

AreaSeries Props

PropTypeDefaultDescription
type'standard' | 'grouped' | 'stacked' | 'stackedNormalized''standard'Chart type
animatedbooleantrueEnable animations
interpolationInterpolationTypes'linear'Curve interpolation
colorSchemeColorSchemeType'cybertron'Color scheme name or function
areaReactElement<AreaProps> | null<Area />Area fill component (null to hide)
lineReactElement<LineProps> | null<Line />Line component (null to hide)
symbolsReactElement<PointSeriesProps> | null<PointSeries />Data point symbols
tooltipReactElement<TooltipAreaProps><TooltipArea />Tooltip component
markLineReactElement<MarkLineProps> | null<MarkLine />Hover mark line
valueMarkersReactElement<LinearValueMarkerProps>[] | nullReference lines at specific values

Area Props

PropTypeDefaultDescription
gradientReactElement<GradientProps> | null<Gradient />Area gradient fill
maskReactElement<MaskProps> | nullSVG pattern mask
glowGlowGlow effect

Line Props

PropTypeDefaultDescription
strokeWidthnumber3Line thickness
showZeroStrokebooleantrueShow line when value is zero
gradientReactElement<GradientProps> | nullLine gradient
glowGlowGlow effect

PointSeries Props

PropTypeDefaultDescription
showboolean | 'hover' | 'first' | 'last''hover'When to show data points
pointReactElement<ScatterPointProps><ScatterPoint />Point element to render

Basic Usage

Single Series

const data = [
  { key: new Date('2024-01-01'), data: 10 },
  { key: new Date('2024-02-01'), data: 25 },
  { key: new Date('2024-03-01'), data: 18 },
];

<AreaChart
  width={350}
  height={250}
  data={data}
/>

Multi-Series (Grouped)

const data = [
  { key: new Date('2024-01-01'), data: [
    { key: 'Series A', data: 10 },
    { key: 'Series B', data: 15 },
  ]},
  { key: new Date('2024-02-01'), data: [
    { key: 'Series A', data: 25 },
    { key: 'Series B', data: 20 },
  ]},
];

<AreaChart
  width={550}
  height={350}
  data={data}
  series={<AreaSeries type="grouped" colorScheme="cybertron" />}
/>

Stacked

<StackedAreaChart
  width={550}
  height={350}
  data={multiSeriesData}
  series={<StackedAreaSeries colorScheme="cybertron" />}
/>

Stacked Normalized (Percentage)

<StackedNormalizedAreaChart
  width={550}
  height={350}
  data={multiSeriesData}
  series={<StackedNormalizedAreaSeries colorScheme="cybertron" />}
/>

Customization

Smooth Interpolation

<AreaChart
  data={data}
  series={<AreaSeries interpolation="smooth" />}
/>

Custom Gradient

import { Area, Gradient, GradientStop } from 'reaviz';

<AreaChart
  data={data}
  series={
    <AreaSeries
      area={
        <Area
          gradient={
            <Gradient
              stops={[
                <GradientStop offset="0%" stopOpacity={0.2} />,
                <GradientStop offset="50%" stopOpacity={1} />,
              ]}
            />
          }
        />
      }
    />
  }
/>

Pattern Mask

import { Area, Stripes } from 'reaviz';

<AreaChart
  data={data}
  series={
    <AreaSeries area={<Area mask={<Stripes />} />} />
  }
/>

Value Markers (Reference Lines)

import { LinearValueMarker } from 'reaviz';

<AreaChart
  data={data}
  series={
    <AreaSeries
      type="grouped"
      valueMarkers={[
        <LinearValueMarker value={12} color="#D740BE" />,
        <LinearValueMarker value={6} color="#F8A340" />,
      ]}
    />
  }
/>

Point Visibility

// Always visible
<AreaSeries symbols={<PointSeries show={true} />} />

// Only on hover (default)
<AreaSeries symbols={<PointSeries show="hover" />} />

// First or last point only
<AreaSeries symbols={<PointSeries show="first" />} />
<AreaSeries symbols={<PointSeries show="last" />} />

// No points
<AreaSeries symbols={null} />

Line Only (No Fill)

<AreaSeries area={null} />

Area Only (No Line)

<AreaSeries line={null} />

Custom Line Width

<AreaSeries line={<Line strokeWidth={5} />} />

Custom Colors

// Function-based
<AreaSeries colorScheme={(_data, index) => index % 2 ? 'blue' : 'green'} />

Secondary Axis

<AreaChart
  data={data}
  secondaryAxis={[
    <LinearXAxis type="category" position="start" />,
  ]}
/>

Axis Configuration

import { LinearXAxis, LinearYAxis, LinearXAxisTickSeries, LinearYAxisTickSeries } from 'reaviz';

<AreaChart
  data={data}
  xAxis={
    <LinearXAxis
      type="time"
      tickSeries={<LinearXAxisTickSeries label={null} />}
    />
  }
  yAxis={
    <LinearYAxis
      type="value"
      tickSeries={<LinearYAxisTickSeries label={null} />}
    />
  }
/>

No Gridlines

<AreaChart data={data} gridlines={null} />

Interpolation Types

ValueCurve
'linear'Straight line segments (default)
'smooth'Cardinal spline
'step'Step function
'monotone'Monotone cubic
'natural'Natural cubic spline
'basis'B-spline
'cardinal'Cardinal spline

Variant Components

ComponentDescription
AreaChartBase chart — single or multi-series via type prop on series
StackedAreaChartPre-configured for type="stacked" with nested data
StackedNormalizedAreaChartStacked to 100% with percentage Y-axis formatting
AreaSeriesDefault series component
StackedAreaSeriesSeries pre-set to type="stacked"
StackedNormalizedAreaSeriesSeries pre-set to type="stackedNormalized" with percentage tooltips

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.