• What is KendoReact
  • Getting Started
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Formupdated
    • Ganttupdated
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBoxupdated
    • ListView
    • Map
    • Notification
    • OrgChartnew
    • PDF Processing
    • PDFViewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Upload
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

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')
);
NameTypeDefaultDescription

element

"null" | HTMLDivElement

The DOM element of the Sparkline.

props

Readonly<SparklineProps>

The props of the Sparkline component.

surface

"null" | Surface

The Drawing Surface of the Sparkline.

In this article

Not finding the help you need?