Skip to content

Line chart

Several series over time where fills would overlap.

In use

Cache hits

Last 30 days

Variants

Data alternative

About 58% of requests are served from cache on every day, so the two lines move together and stay a constant distance apart.

Code
<ChartContainer config={config} label="Requests and cached requests per day">
  <LineChart data={data}>
    <ChartTooltip />
    <ChartLegend />
    <Line isAnimationActive={false} dataKey="requests" stroke={chartVar("requests")} strokeWidth={2} dot={false} />
    <Line isAnimationActive={false} dataKey="cached" stroke={chartVar("cached")} strokeWidth={2} dot={false} />
  </LineChart>
</ChartContainer>