ComponentsChartsSparklineGradient (Deprecated)SparklineGradient (Deprecated)@coinbase/cds-web-visualization@3.7.0A small line chart component with gradient fill below the line.Sparkline components are deprecated. Please use LineChart instead.import { SparklineGradient } from '@coinbase/cds-web-visualization'SourceStorybookFigmaCopy for LLMView as MarkdownRelated componentsSparkline, LineChartExamplesPropsExpands upon the Sparkline component to provide a gradient stroke. However, for dark mode we disable the gradient effect. These are typically used at a larger size for portfolio charts or on detail Asset pages. Dynamic path colors Loading... Live Codefunction Example() { const dimensions = { width: 400, height: 200 }; const path = useSparklinePath({ ...dimensions, data: prices }); return ( <VStack gap={2}> {assetColors.map((color) => ( <SparklineGradient key={color} {...dimensions} path={path} color={color} /> ))} </VStack> ); } Show codeCopy codeReset previewOpen in StackBlitz Dynamic background colors Loading... Live Codefunction Example() { const dimensions = { width: 400, height: 200 }; const path = useSparklinePath({ ...dimensions, data: prices }); return ( <VStack gap={2}> {assetColors.map((background) => ( <VStack key={background} dangerouslySetBackground={background}> <SparklineGradient {...dimensions} path={path} background={background} color="auto" /> </VStack> ))} </VStack> ); } Show codeCopy codeReset previewOpen in StackBlitz y axis scaling