# Profit/Loss Line Chart

https://fieldbook.lizardi.mx/components/profit-loss-line-chart

Category: Charts
![Still of the Profit/Loss Line Chart component, a Fieldbook UI component in Charts.](https://fieldbook.lizardi.mx/thumbs/profit-loss-line-chart.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/profit-loss-line-chart-f1f5bd76e3.mp4 (5 s, silent)

Profit/Loss Line Chart: A line chart whose stroke changes color depending on whether the value is above or below zero, splitting cleanly at each crossing point.

## Frameworks

react, vue, svelte, astro, html

## Preview controls

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

| Name | Type | Default | Options or constraints |
| --- | --- | --- | --- |
| positiveColor | color | #34D399 | No additional limit in the metadata. |
| negativeColor | color | #F87171 | No additional limit in the metadata. |
| strokeWidth | number | 3 | From 1 to 6; step 0.5 |
| smooth | boolean | false | No additional limit in the metadata. |

## Usage notes

Profit/Loss Line Chart uses the wide preview frame with a dark theme setting.

### Which frameworks are available for Profit/Loss Line Chart?

Profit/Loss Line Chart is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

### What does Profit/Loss Line Chart depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx, tailwind-merge.

### What accessibility details are visible in Profit/Loss Line Chart?

The React source for Profit/Loss Line Chart includes: native elements (button); attributes and handlers (aria-hidden, aria-label, onKeyDown, tabIndex); explicit roles (img); key comparisons (ArrowLeft, ArrowRight, Escape). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

### How does Profit/Loss Line Chart handle reduced motion?

Profit/Loss Line Chart reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: delay: reduce ? 0 : i \* 0.06; duration: reduce ? 0 : 0.7. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

## Install through MCP

Connect your client, call get_component to retrieve the implementation, then get_install_command for installation instructions. Choose a listed framework, integrate the returned source and verify it in your application.

```json
{
  "tool": "get_component",
  "arguments": {
    "slug": "profit-loss-line-chart",
    "framework": "react"
  }
}
```

[For agents](https://fieldbook.lizardi.mx/docs/agents)
[MCP](https://fieldbook.lizardi.mx/api/mcp)

## Related open components

- [Sessions Line Card](https://fieldbook.lizardi.mx/components/sessions-line-stat-card)
- [Activity cell heatmap](https://fieldbook.lizardi.mx/components/activity-cell-heatmap)
- [Animated Time Axis](https://fieldbook.lizardi.mx/components/animated-time-axis)
- [Area chart lite](https://fieldbook.lizardi.mx/components/area-chart-lite)
- [Candle Price Chart](https://fieldbook.lizardi.mx/components/candle-price-chart)
- [Concentric Ring Chart](https://fieldbook.lizardi.mx/components/concentric-ring-chart)
