• What is KendoReact
  • Getting Started
  • Unstyled Mode
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chart Wizardnew
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Toolsupdated
    • Date Inputs
    • Date Math
    • Dialogsupdated
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBoxupdated
    • ListView
    • Map
    • Notification
    • OrgChart
    • PDF Processing
    • PDF Viewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheet
    • 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?