Sparkline

A subclass of React.Component.

The root Sparkline component.

import {
    Sparkline,
    ChartValueAxis,
    ChartValueAxisItem
} from '@progress/kendo-react-charts';

const sparklineData = [ 936, 968, 1025, 999, 998, 1014, 1017, 1010, 1010, 1007 ];
const bulletData = [ 21, 23 ];
const bulletValueAxis = {
    min: 0,
    max: 30,
    plotBands: [{
        from: 0, to: 15, color: '#787878', opacity: 0.15
    }, {
        from: 15, to: 22, color: '#787878', opacity: 0.3
    }, {
        from: 22, to: 30, color: '#787878', opacity: 0.15
    }]
};

const SparklineContainer = () => (
     <ul>
       <li>
           Base Sparkline chart
           <Sparkline data={sparklineData} />
       </li>
       <li>
           Bar/Column type Sparkline chart
           <Sparkline data={sparklineData} type="column" />
       </li>
       <li>
           Area type Sparkline chart
           <Sparkline data={sparklineData} type="area" />
       </li>
       <li>
           Pie type Sparkline chart
           <Sparkline data={sparklineData} type="pie" />
       </li>
       <li>
           Bullet type Sparkline chart
           <Sparkline data={bulletData} type="bullet">
               <ChartValueAxis>
                   <ChartValueAxisItem {...bulletValueAxis} />
               </ChartValueAxis>
           </Sparkline>
       </li>
     </ul>
);

ReactDOM.render(
    <SparklineContainer />,
    document.querySelector('my-app')
);

props Readonly<SparklineProps> intersected with Readonly<{ children?: ReactNode; }>

The props of the Sparkline component.

element HTMLDivElement | null

The DOM element of the Sparkline.

surface Surface | null

The Drawing Surface of the Sparkline.

 /