DevExtreme v24.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Charts - Chart with Annotations

Annotations are containers for images, text blocks, and custom content that display additional information about the visualized data.

To create annotations, populate the Chart's annotations array. Each object in the array configures an individual annotation. To specify properties for all annotations, use the commonAnnotationSettings object. Individual settings take precedence over common settings.

https://www.wikipedia.org/
Backend API
import React from 'react'; import { Chart, Title, CommonSeriesSettings, Series, Legend, ArgumentAxis, ValueAxis, CommonAnnotationSettings, Font, Image, Annotation, } from 'devextreme-react/chart'; import { dataSource, annotationSources } from './data.ts'; const customizeTooltip = (annotation) => ({ html: `<div class='tooltip'>${annotation.description}</div>`, }); function App() { return ( <Chart id="chart" dataSource={dataSource} > <Title text="Apple Stock Price" subtitle="AAPL" /> <CommonSeriesSettings argumentField="date" type="line" /> <Series valueField="close" name="AAPL" /> <Legend visible={false} /> <ArgumentAxis argumentType="datetime" /> <ValueAxis position="right" /> <CommonAnnotationSettings series="AAPL" type="image" customizeTooltip={customizeTooltip}> <Font size={16} weight={600} /> <Image width={50.5} height={105.75} /> </CommonAnnotationSettings> { annotationSources.map((item) => <Annotation key={item.description} argument={item.date} type={item.type} text={item.text} description={item.description} paddingTopBottom={item.padding} offsetY={item.offset}> <Image url={item.image} /> </Annotation>) } </Chart> ); } export default App;
import React from 'react'; import { Chart, Title, CommonSeriesSettings, Series, Legend, ArgumentAxis, ValueAxis, CommonAnnotationSettings, Font, Image, Annotation, } from 'devextreme-react/chart'; import { dataSource, annotationSources } from './data.js'; const customizeTooltip = (annotation) => ({ html: `<div class='tooltip'>${annotation.description}</div>`, }); function App() { return ( <Chart id="chart" dataSource={dataSource} > <Title text="Apple Stock Price" subtitle="AAPL" /> <CommonSeriesSettings argumentField="date" type="line" /> <Series valueField="close" name="AAPL" /> <Legend visible={false} /> <ArgumentAxis argumentType="datetime" /> <ValueAxis position="right" /> <CommonAnnotationSettings series="AAPL" type="image" customizeTooltip={customizeTooltip} > <Font size={16} weight={600} /> <Image width={50.5} height={105.75} /> </CommonAnnotationSettings> {annotationSources.map((item) => ( <Annotation key={item.description} argument={item.date} type={item.type} text={item.text} description={item.description} paddingTopBottom={item.padding} offsetY={item.offset} > <Image url={item.image} /> </Annotation> ))} </Chart> ); } export default App;
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.tsx'; ReactDOM.render( <App />, document.getElementById('app'), );
import { IAnnotationProps } from 'devextreme-react/chart'; interface AnnotationSource { date: Date, padding?: number, offset?: number, } export const annotationSources: (IAnnotationProps & AnnotationSource)[] = [{ date: new Date(2016, 2, 31), description: 'The iPhone SE (Special Edition) is a smartphone that was designed and marketed by Apple Inc. It is part of the ninth generation of the iPhone alongside the iPhone 6S. It was announced on March 21, 2016 at the Town Hall auditorium in the Apple Campus by Apple executive Greg Joswiak, with pre-orders beginning on March 24, and official release on March 31, 2016. It was re-released almost a year later on March 24, 2017 with larger storage capacities. The iPhone SE shares the same physical design and dimensions as the iPhone 5S, but has upgraded internal hardware, including the newer Apple A9 system-on-chip, greater battery capacity, and a 12-megapixel rear camera that can record 4K video. Along with the iPhone 6S and the iPhone X, the iPhone SE was discontinued by Apple on September 12, 2018', image: '../../../../images/Charts/Annotation/iphone-se.png', }, { date: new Date(2017, 10, 3), description: 'iPhone X (Roman numeral \'X\' pronounced \'ten\') is a smartphone designed, developed, and marketed by Apple Inc. It was the eleventh generation of the iPhone. It was announced on September 12, 2017, alongside the iPhone 8 and iPhone 8 Plus, at the Steve Jobs Theater in the Apple Park campus. The phone was released on November 3, 2017, marking the iPhone series\' tenth anniversary.', offset: 110, image: '../../../../images/Charts/Annotation/iphone-x.png', }, { date: new Date(2015, 3, 24), description: 'Apple Watch is a line of smartwatches designed, developed, and marketed by Apple Inc. It incorporates fitness tracking and health-oriented capabilities with integration with iOS and other Apple products and services. The Apple Watch was released on April 24, 2015 and quickly became the best-selling wearable device with 4.2 million sold in the second quarter of the 2015 fiscal year.', padding: 5, image: '../../../../images/Charts/Annotation/apple-watch.png', }, { type: 'text', text: 'WWDC 2017', date: new Date(2017, 5, 5), description: 'The Apple Worldwide Developers Conference was held from June 5 to June 9, 2017 at the San Jose Convention Center in San Jose, California, which was the first time since 2002 that the conference took place in the city. Software announcements included iOS 11, watchOS 4, macOS High Sierra, and updates to tvOS. Hardware announcements included updates to iMac, MacBook and MacBook Pro, as well as the new iMac Pro, 10.5-inch iPad Pro and smart speaker HomePod. Fall Out Boy performed at the Bash held in Discovery Meadow on June 8.', }, { type: 'text', text: 'Apple TV+ announced', date: new Date(2019, 2, 25), description: 'Apple TV+ is an upcoming over-the-top ad-free subscription video on demand web television service announced by Apple Inc. in 2019 during their March 25 Apple Special Event held at Steve Jobs Theater', }]; export const dataSource = [{ date: '2014-12-29', close: 109.330002, }, { date: '2015-01-05', close: 112.010002, }, { date: '2015-01-12', close: 105.989998, }, { date: '2015-01-19', close: 112.980003, }, { date: '2015-01-26', close: 117.160004, }, { date: '2015-02-02', close: 118.93, }, { date: '2015-02-09', close: 127.080002, }, { date: '2015-02-16', close: 129.5, }, { date: '2015-02-23', close: 128.460007, }, { date: '2015-03-02', close: 126.599998, }, { date: '2015-03-09', close: 123.589996, }, { date: '2015-03-16', close: 125.900002, }, { date: '2015-03-23', close: 123.25, }, { date: '2015-03-30', close: 125.32, }, { date: '2015-04-06', close: 127.099998, }, { date: '2015-04-13', close: 124.75, }, { date: '2015-04-20', close: 130.279999, }, { date: '2015-04-27', close: 128.949997, }, { date: '2015-05-04', close: 127.620003, }, { date: '2015-05-11', close: 128.770004, }, { date: '2015-05-18', close: 132.539993, }, { date: '2015-05-25', close: 130.279999, }, { date: '2015-06-01', close: 128.649994, }, { date: '2015-06-08', close: 127.169998, }, { date: '2015-06-15', close: 126.599998, }, { date: '2015-06-22', close: 126.75, }, { date: '2015-06-29', close: 126.440002, }, { date: '2015-07-06', close: 123.279999, }, { date: '2015-07-13', close: 129.619995, }, { date: '2015-07-20', close: 124.5, }, { date: '2015-07-27', close: 121.300003, }, { date: '2015-08-03', close: 115.519997, }, { date: '2015-08-10', close: 115.959999, }, { date: '2015-08-17', close: 105.760002, }, { date: '2015-08-24', close: 113.290001, }, { date: '2015-08-31', close: 109.269997, }, { date: '2015-09-07', close: 114.209999, }, { date: '2015-09-14', close: 113.449997, }, { date: '2015-09-21', close: 114.709999, }, { date: '2015-09-28', close: 110.379997, }, { date: '2015-10-05', close: 112.120003, }, { date: '2015-10-12', close: 111.040001, }, { date: '2015-10-19', close: 119.080002, }, { date: '2015-10-26', close: 119.5, }, { date: '2015-11-02', close: 121.059998, }, { date: '2015-11-09', close: 112.339996, }, { date: '2015-11-16', close: 119.300003, }, { date: '2015-11-23', close: 117.809998, }, { date: '2015-11-30', close: 119.029999, }, { date: '2015-12-07', close: 113.18, }, { date: '2015-12-14', close: 106.029999, }, { date: '2015-12-21', close: 108.029999, }, { date: '2015-12-28', close: 105.260002, }, { date: '2016-01-04', close: 96.959999, }, { date: '2016-01-11', close: 97.129997, }, { date: '2016-01-18', close: 101.419998, }, { date: '2016-01-25', close: 97.339996, }, { date: '2016-02-01', close: 94.019997, }, { date: '2016-02-08', close: 93.989998, }, { date: '2016-02-15', close: 96.040001, }, { date: '2016-02-22', close: 96.910004, }, { date: '2016-02-29', close: 103.010002, }, { date: '2016-03-07', close: 102.260002, }, { date: '2016-03-14', close: 105.919998, }, { date: '2016-03-21', close: 105.669998, }, { date: '2016-03-28', close: 109.989998, }, { date: '2016-04-04', close: 108.660004, }, { date: '2016-04-11', close: 109.849998, }, { date: '2016-04-18', close: 105.68, }, { date: '2016-04-25', close: 93.739998, }, { date: '2016-05-02', close: 92.720001, }, { date: '2016-05-09', close: 90.519997, }, { date: '2016-05-16', close: 95.220001, }, { date: '2016-05-23', close: 100.349998, }, { date: '2016-05-30', close: 97.919998, }, { date: '2016-06-06', close: 98.830002, }, { date: '2016-06-13', close: 95.330002, }, { date: '2016-06-20', close: 93.400002, }, { date: '2016-06-27', close: 95.889999, }, { date: '2016-07-04', close: 96.68, }, { date: '2016-07-11', close: 98.779999, }, { date: '2016-07-18', close: 98.660004, }, { date: '2016-07-25', close: 104.209999, }, { date: '2016-08-01', close: 107.480003, }, { date: '2016-08-08', close: 108.18, }, { date: '2016-08-15', close: 109.360001, }, { date: '2016-08-22', close: 106.940002, }, { date: '2016-08-29', close: 107.730003, }, { date: '2016-09-05', close: 103.129997, }, { date: '2016-09-12', close: 114.919998, }, { date: '2016-09-19', close: 112.709999, }, { date: '2016-09-26', close: 113.050003, }, { date: '2016-10-03', close: 114.059998, }, { date: '2016-10-10', close: 117.629997, }, { date: '2016-10-17', close: 116.599998, }, { date: '2016-10-24', close: 113.720001, }, { date: '2016-10-31', close: 108.839996, }, { date: '2016-11-07', close: 108.43, }, { date: '2016-11-14', close: 110.059998, }, { date: '2016-11-21', close: 111.790001, }, { date: '2016-11-28', close: 109.900002, }, { date: '2016-12-05', close: 113.949997, }, { date: '2016-12-12', close: 115.970001, }, { date: '2016-12-19', close: 116.519997, }, { date: '2016-12-26', close: 115.82, }, { date: '2017-01-02', close: 117.910004, }, { date: '2017-01-09', close: 119.040001, }, { date: '2017-01-16', close: 120, }, { date: '2017-01-23', close: 121.949997, }, { date: '2017-01-30', close: 129.080002, }, { date: '2017-02-06', close: 132.119995, }, { date: '2017-02-13', close: 135.720001, }, { date: '2017-02-20', close: 136.660004, }, { date: '2017-02-27', close: 139.779999, }, { date: '2017-03-06', close: 139.139999, }, { date: '2017-03-13', close: 139.990005, }, { date: '2017-03-20', close: 140.639999, }, { date: '2017-03-27', close: 143.660004, }, { date: '2017-04-03', close: 143.339996, }, { date: '2017-04-10', close: 141.050003, }, { date: '2017-04-17', close: 142.270004, }, { date: '2017-04-24', close: 143.649994, }, { date: '2017-05-01', close: 148.960007, }, { date: '2017-05-08', close: 156.100006, }, { date: '2017-05-15', close: 153.059998, }, { date: '2017-05-22', close: 153.610001, }, { date: '2017-05-29', close: 155.449997, }, { date: '2017-06-05', close: 148.979996, }, { date: '2017-06-12', close: 142.270004, }, { date: '2017-06-19', close: 146.279999, }, { date: '2017-06-26', close: 144.020004, }, { date: '2017-07-03', close: 144.179993, }, { date: '2017-07-10', close: 149.039993, }, { date: '2017-07-17', close: 150.270004, }, { date: '2017-07-24', close: 149.5, }, { date: '2017-07-31', close: 156.389999, }, { date: '2017-08-07', close: 157.479996, }, { date: '2017-08-14', close: 157.5, }, { date: '2017-08-21', close: 159.860001, }, { date: '2017-08-28', close: 164.050003, }, { date: '2017-09-04', close: 158.630005, }, { date: '2017-09-11', close: 159.880005, }, { date: '2017-09-18', close: 151.889999, }, { date: '2017-09-25', close: 154.119995, }, { date: '2017-10-02', close: 155.300003, }, { date: '2017-10-09', close: 156.990005, }, { date: '2017-10-16', close: 156.25, }, { date: '2017-10-23', close: 163.050003, }, { date: '2017-10-30', close: 172.5, }, { date: '2017-11-06', close: 174.669998, }, { date: '2017-11-13', close: 170.149994, }, { date: '2017-11-20', close: 174.970001, }, { date: '2017-11-27', close: 171.050003, }, { date: '2017-12-04', close: 169.369995, }, { date: '2017-12-11', close: 173.970001, }, { date: '2017-12-18', close: 175.009995, }, { date: '2017-12-25', close: 169.229996, }, { date: '2018-01-01', close: 175, }, { date: '2018-01-08', close: 177.089996, }, { date: '2018-01-15', close: 178.460007, }, { date: '2018-01-22', close: 171.509995, }, { date: '2018-01-29', close: 160.5, }, { date: '2018-02-05', close: 156.410004, }, { date: '2018-02-12', close: 172.429993, }, { date: '2018-02-19', close: 175.5, }, { date: '2018-02-26', close: 176.210007, }, { date: '2018-03-05', close: 179.979996, }, { date: '2018-03-12', close: 178.020004, }, { date: '2018-03-19', close: 164.940002, }, { date: '2018-03-26', close: 167.779999, }, { date: '2018-04-02', close: 168.380005, }, { date: '2018-04-09', close: 174.729996, }, { date: '2018-04-16', close: 165.720001, }, { date: '2018-04-23', close: 162.320007, }, { date: '2018-04-30', close: 183.830002, }, { date: '2018-05-07', close: 188.589996, }, { date: '2018-05-14', close: 186.309998, }, { date: '2018-05-21', close: 188.580002, }, { date: '2018-05-28', close: 190.240005, }, { date: '2018-06-04', close: 191.699997, }, { date: '2018-06-11', close: 188.839996, }, { date: '2018-06-18', close: 184.919998, }, { date: '2018-06-25', close: 185.110001, }, { date: '2018-07-02', close: 187.970001, }, { date: '2018-07-09', close: 191.330002, }, { date: '2018-07-16', close: 191.440002, }, { date: '2018-07-23', close: 190.979996, }, { date: '2018-07-30', close: 207.990005, }, { date: '2018-08-06', close: 207.529999, }, { date: '2018-08-13', close: 217.580002, }, { date: '2018-08-20', close: 216.160004, }, { date: '2018-08-27', close: 227.630005, }, { date: '2018-09-03', close: 221.300003, }, { date: '2018-09-10', close: 223.839996, }, { date: '2018-09-17', close: 217.660004, }, { date: '2018-09-24', close: 225.740005, }, { date: '2018-10-01', close: 224.289993, }, { date: '2018-10-08', close: 222.110001, }, { date: '2018-10-15', close: 219.309998, }, { date: '2018-10-22', close: 216.300003, }, { date: '2018-10-29', close: 207.479996, }, { date: '2018-11-05', close: 204.470001, }, { date: '2018-11-12', close: 193.529999, }, { date: '2018-11-19', close: 172.289993, }, { date: '2018-11-26', close: 178.580002, }, { date: '2018-12-03', close: 168.490005, }, { date: '2018-12-10', close: 165.479996, }, { date: '2018-12-17', close: 150.729996, }, { date: '2018-12-24', close: 156.229996, }, { date: '2018-12-31', close: 148.259995, }, { date: '2019-01-07', close: 152.289993, }, { date: '2019-01-14', close: 156.820007, }, { date: '2019-01-21', close: 157.759995, }, { date: '2019-01-28', close: 166.520004, }, { date: '2019-02-04', close: 170.410004, }, { date: '2019-02-11', close: 170.419998, }, { date: '2019-02-18', close: 172.970001, }, { date: '2019-02-25', close: 174.970001, }, { date: '2019-03-04', close: 172.910004, }, { date: '2019-03-11', close: 186.119995, }, { date: '2019-03-18', close: 191.050003, }, { date: '2019-03-25', close: 189.949997, }, { date: '2019-04-01', close: 197, }, { date: '2019-04-08', close: 198.869995, }, { date: '2019-04-15', close: 203.860001, }, { date: '2019-04-22', close: 205.279999, }];
window.exports = window.exports || {}; window.config = { transpiler: 'ts', typescriptOptions: { module: 'system', emitDecoratorMetadata: true, experimentalDecorators: true, jsx: 'react', }, meta: { 'react': { 'esModule': true, }, 'typescript': { 'exports': 'ts', }, 'devextreme/time_zone_utils.js': { 'esModule': true, }, 'devextreme/localization.js': { 'esModule': true, }, 'devextreme/viz/palette.js': { 'esModule': true, }, }, paths: { 'npm:': 'https://unpkg.com/', }, defaultExtension: 'js', map: { 'ts': 'npm:plugin-typescript@4.2.4/lib/plugin.js', 'typescript': 'npm:typescript@4.2.4/lib/typescript.js', 'react': 'npm:react@17.0.2/umd/react.development.js', 'react-dom': 'npm:react-dom@17.0.2/umd/react-dom.development.js', 'prop-types': 'npm:prop-types@15.8.1/prop-types.js', 'rrule': 'npm:rrule@2.6.4/dist/es5/rrule.js', 'luxon': 'npm:luxon@1.28.1/build/global/luxon.min.js', 'es6-object-assign': 'npm:es6-object-assign@1.1.0', 'devextreme': 'npm:devextreme@24.1.7/cjs', 'devextreme-react': 'npm:devextreme-react@24.1.7/cjs', 'jszip': 'npm:jszip@3.10.1/dist/jszip.min.js', 'devextreme-quill': 'npm:devextreme-quill@1.7.1/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram@2.2.13/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt@4.1.56/dist/dx-gantt.js', '@devextreme/runtime': 'npm:@devextreme/runtime@3.0.13', 'inferno': 'npm:inferno@7.4.11/dist/inferno.min.js', 'inferno-compat': 'npm:inferno-compat/dist/inferno-compat.min.js', 'inferno-create-element': 'npm:inferno-create-element@7.4.11/dist/inferno-create-element.min.js', 'inferno-dom': 'npm:inferno-dom/dist/inferno-dom.min.js', 'inferno-hydrate': 'npm:inferno-hydrate@7.4.11/dist/inferno-hydrate.min.js', 'inferno-clone-vnode': 'npm:inferno-clone-vnode/dist/inferno-clone-vnode.min.js', 'inferno-create-class': 'npm:inferno-create-class/dist/inferno-create-class.min.js', 'inferno-extras': 'npm:inferno-extras/dist/inferno-extras.min.js', 'devextreme-cldr-data': 'npm:devextreme-cldr-data@1.0.3', // SystemJS plugins 'plugin-babel': 'npm:systemjs-plugin-babel@0.0.25/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js', // Prettier 'prettier/standalone': 'npm:prettier@2.8.8/standalone.js', 'prettier/parser-html': 'npm:prettier@2.8.8/parser-html.js', }, packages: { 'devextreme': { defaultExtension: 'js', }, 'devextreme-react': { main: 'index.js', }, 'devextreme/events/utils': { main: 'index', }, 'devextreme/localization/messages': { format: 'json', defaultExtension: 'json', }, 'devextreme/events': { main: 'index', }, 'es6-object-assign': { main: './index.js', defaultExtension: 'js', }, }, packageConfigPaths: [ 'npm:@devextreme/*/package.json', 'npm:@devextreme/runtime@3.0.13/inferno/package.json', ], babelOptions: { sourceMaps: false, stage0: true, react: true, }, }; System.config(window.config);
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; ReactDOM.render(<App />, document.getElementById('app'));
export const annotationSources = [ { date: new Date(2016, 2, 31), description: 'The iPhone SE (Special Edition) is a smartphone that was designed and marketed by Apple Inc. It is part of the ninth generation of the iPhone alongside the iPhone 6S. It was announced on March 21, 2016 at the Town Hall auditorium in the Apple Campus by Apple executive Greg Joswiak, with pre-orders beginning on March 24, and official release on March 31, 2016. It was re-released almost a year later on March 24, 2017 with larger storage capacities. The iPhone SE shares the same physical design and dimensions as the iPhone 5S, but has upgraded internal hardware, including the newer Apple A9 system-on-chip, greater battery capacity, and a 12-megapixel rear camera that can record 4K video. Along with the iPhone 6S and the iPhone X, the iPhone SE was discontinued by Apple on September 12, 2018', image: '../../../../images/Charts/Annotation/iphone-se.png', }, { date: new Date(2017, 10, 3), description: "iPhone X (Roman numeral 'X' pronounced 'ten') is a smartphone designed, developed, and marketed by Apple Inc. It was the eleventh generation of the iPhone. It was announced on September 12, 2017, alongside the iPhone 8 and iPhone 8 Plus, at the Steve Jobs Theater in the Apple Park campus. The phone was released on November 3, 2017, marking the iPhone series' tenth anniversary.", offset: 110, image: '../../../../images/Charts/Annotation/iphone-x.png', }, { date: new Date(2015, 3, 24), description: 'Apple Watch is a line of smartwatches designed, developed, and marketed by Apple Inc. It incorporates fitness tracking and health-oriented capabilities with integration with iOS and other Apple products and services. The Apple Watch was released on April 24, 2015 and quickly became the best-selling wearable device with 4.2 million sold in the second quarter of the 2015 fiscal year.', padding: 5, image: '../../../../images/Charts/Annotation/apple-watch.png', }, { type: 'text', text: 'WWDC 2017', date: new Date(2017, 5, 5), description: 'The Apple Worldwide Developers Conference was held from June 5 to June 9, 2017 at the San Jose Convention Center in San Jose, California, which was the first time since 2002 that the conference took place in the city. Software announcements included iOS 11, watchOS 4, macOS High Sierra, and updates to tvOS. Hardware announcements included updates to iMac, MacBook and MacBook Pro, as well as the new iMac Pro, 10.5-inch iPad Pro and smart speaker HomePod. Fall Out Boy performed at the Bash held in Discovery Meadow on June 8.', }, { type: 'text', text: 'Apple TV+ announced', date: new Date(2019, 2, 25), description: 'Apple TV+ is an upcoming over-the-top ad-free subscription video on demand web television service announced by Apple Inc. in 2019 during their March 25 Apple Special Event held at Steve Jobs Theater', }, ]; export const dataSource = [ { date: '2014-12-29', close: 109.330002, }, { date: '2015-01-05', close: 112.010002, }, { date: '2015-01-12', close: 105.989998, }, { date: '2015-01-19', close: 112.980003, }, { date: '2015-01-26', close: 117.160004, }, { date: '2015-02-02', close: 118.93, }, { date: '2015-02-09', close: 127.080002, }, { date: '2015-02-16', close: 129.5, }, { date: '2015-02-23', close: 128.460007, }, { date: '2015-03-02', close: 126.599998, }, { date: '2015-03-09', close: 123.589996, }, { date: '2015-03-16', close: 125.900002, }, { date: '2015-03-23', close: 123.25, }, { date: '2015-03-30', close: 125.32, }, { date: '2015-04-06', close: 127.099998, }, { date: '2015-04-13', close: 124.75, }, { date: '2015-04-20', close: 130.279999, }, { date: '2015-04-27', close: 128.949997, }, { date: '2015-05-04', close: 127.620003, }, { date: '2015-05-11', close: 128.770004, }, { date: '2015-05-18', close: 132.539993, }, { date: '2015-05-25', close: 130.279999, }, { date: '2015-06-01', close: 128.649994, }, { date: '2015-06-08', close: 127.169998, }, { date: '2015-06-15', close: 126.599998, }, { date: '2015-06-22', close: 126.75, }, { date: '2015-06-29', close: 126.440002, }, { date: '2015-07-06', close: 123.279999, }, { date: '2015-07-13', close: 129.619995, }, { date: '2015-07-20', close: 124.5, }, { date: '2015-07-27', close: 121.300003, }, { date: '2015-08-03', close: 115.519997, }, { date: '2015-08-10', close: 115.959999, }, { date: '2015-08-17', close: 105.760002, }, { date: '2015-08-24', close: 113.290001, }, { date: '2015-08-31', close: 109.269997, }, { date: '2015-09-07', close: 114.209999, }, { date: '2015-09-14', close: 113.449997, }, { date: '2015-09-21', close: 114.709999, }, { date: '2015-09-28', close: 110.379997, }, { date: '2015-10-05', close: 112.120003, }, { date: '2015-10-12', close: 111.040001, }, { date: '2015-10-19', close: 119.080002, }, { date: '2015-10-26', close: 119.5, }, { date: '2015-11-02', close: 121.059998, }, { date: '2015-11-09', close: 112.339996, }, { date: '2015-11-16', close: 119.300003, }, { date: '2015-11-23', close: 117.809998, }, { date: '2015-11-30', close: 119.029999, }, { date: '2015-12-07', close: 113.18, }, { date: '2015-12-14', close: 106.029999, }, { date: '2015-12-21', close: 108.029999, }, { date: '2015-12-28', close: 105.260002, }, { date: '2016-01-04', close: 96.959999, }, { date: '2016-01-11', close: 97.129997, }, { date: '2016-01-18', close: 101.419998, }, { date: '2016-01-25', close: 97.339996, }, { date: '2016-02-01', close: 94.019997, }, { date: '2016-02-08', close: 93.989998, }, { date: '2016-02-15', close: 96.040001, }, { date: '2016-02-22', close: 96.910004, }, { date: '2016-02-29', close: 103.010002, }, { date: '2016-03-07', close: 102.260002, }, { date: '2016-03-14', close: 105.919998, }, { date: '2016-03-21', close: 105.669998, }, { date: '2016-03-28', close: 109.989998, }, { date: '2016-04-04', close: 108.660004, }, { date: '2016-04-11', close: 109.849998, }, { date: '2016-04-18', close: 105.68, }, { date: '2016-04-25', close: 93.739998, }, { date: '2016-05-02', close: 92.720001, }, { date: '2016-05-09', close: 90.519997, }, { date: '2016-05-16', close: 95.220001, }, { date: '2016-05-23', close: 100.349998, }, { date: '2016-05-30', close: 97.919998, }, { date: '2016-06-06', close: 98.830002, }, { date: '2016-06-13', close: 95.330002, }, { date: '2016-06-20', close: 93.400002, }, { date: '2016-06-27', close: 95.889999, }, { date: '2016-07-04', close: 96.68, }, { date: '2016-07-11', close: 98.779999, }, { date: '2016-07-18', close: 98.660004, }, { date: '2016-07-25', close: 104.209999, }, { date: '2016-08-01', close: 107.480003, }, { date: '2016-08-08', close: 108.18, }, { date: '2016-08-15', close: 109.360001, }, { date: '2016-08-22', close: 106.940002, }, { date: '2016-08-29', close: 107.730003, }, { date: '2016-09-05', close: 103.129997, }, { date: '2016-09-12', close: 114.919998, }, { date: '2016-09-19', close: 112.709999, }, { date: '2016-09-26', close: 113.050003, }, { date: '2016-10-03', close: 114.059998, }, { date: '2016-10-10', close: 117.629997, }, { date: '2016-10-17', close: 116.599998, }, { date: '2016-10-24', close: 113.720001, }, { date: '2016-10-31', close: 108.839996, }, { date: '2016-11-07', close: 108.43, }, { date: '2016-11-14', close: 110.059998, }, { date: '2016-11-21', close: 111.790001, }, { date: '2016-11-28', close: 109.900002, }, { date: '2016-12-05', close: 113.949997, }, { date: '2016-12-12', close: 115.970001, }, { date: '2016-12-19', close: 116.519997, }, { date: '2016-12-26', close: 115.82, }, { date: '2017-01-02', close: 117.910004, }, { date: '2017-01-09', close: 119.040001, }, { date: '2017-01-16', close: 120, }, { date: '2017-01-23', close: 121.949997, }, { date: '2017-01-30', close: 129.080002, }, { date: '2017-02-06', close: 132.119995, }, { date: '2017-02-13', close: 135.720001, }, { date: '2017-02-20', close: 136.660004, }, { date: '2017-02-27', close: 139.779999, }, { date: '2017-03-06', close: 139.139999, }, { date: '2017-03-13', close: 139.990005, }, { date: '2017-03-20', close: 140.639999, }, { date: '2017-03-27', close: 143.660004, }, { date: '2017-04-03', close: 143.339996, }, { date: '2017-04-10', close: 141.050003, }, { date: '2017-04-17', close: 142.270004, }, { date: '2017-04-24', close: 143.649994, }, { date: '2017-05-01', close: 148.960007, }, { date: '2017-05-08', close: 156.100006, }, { date: '2017-05-15', close: 153.059998, }, { date: '2017-05-22', close: 153.610001, }, { date: '2017-05-29', close: 155.449997, }, { date: '2017-06-05', close: 148.979996, }, { date: '2017-06-12', close: 142.270004, }, { date: '2017-06-19', close: 146.279999, }, { date: '2017-06-26', close: 144.020004, }, { date: '2017-07-03', close: 144.179993, }, { date: '2017-07-10', close: 149.039993, }, { date: '2017-07-17', close: 150.270004, }, { date: '2017-07-24', close: 149.5, }, { date: '2017-07-31', close: 156.389999, }, { date: '2017-08-07', close: 157.479996, }, { date: '2017-08-14', close: 157.5, }, { date: '2017-08-21', close: 159.860001, }, { date: '2017-08-28', close: 164.050003, }, { date: '2017-09-04', close: 158.630005, }, { date: '2017-09-11', close: 159.880005, }, { date: '2017-09-18', close: 151.889999, }, { date: '2017-09-25', close: 154.119995, }, { date: '2017-10-02', close: 155.300003, }, { date: '2017-10-09', close: 156.990005, }, { date: '2017-10-16', close: 156.25, }, { date: '2017-10-23', close: 163.050003, }, { date: '2017-10-30', close: 172.5, }, { date: '2017-11-06', close: 174.669998, }, { date: '2017-11-13', close: 170.149994, }, { date: '2017-11-20', close: 174.970001, }, { date: '2017-11-27', close: 171.050003, }, { date: '2017-12-04', close: 169.369995, }, { date: '2017-12-11', close: 173.970001, }, { date: '2017-12-18', close: 175.009995, }, { date: '2017-12-25', close: 169.229996, }, { date: '2018-01-01', close: 175, }, { date: '2018-01-08', close: 177.089996, }, { date: '2018-01-15', close: 178.460007, }, { date: '2018-01-22', close: 171.509995, }, { date: '2018-01-29', close: 160.5, }, { date: '2018-02-05', close: 156.410004, }, { date: '2018-02-12', close: 172.429993, }, { date: '2018-02-19', close: 175.5, }, { date: '2018-02-26', close: 176.210007, }, { date: '2018-03-05', close: 179.979996, }, { date: '2018-03-12', close: 178.020004, }, { date: '2018-03-19', close: 164.940002, }, { date: '2018-03-26', close: 167.779999, }, { date: '2018-04-02', close: 168.380005, }, { date: '2018-04-09', close: 174.729996, }, { date: '2018-04-16', close: 165.720001, }, { date: '2018-04-23', close: 162.320007, }, { date: '2018-04-30', close: 183.830002, }, { date: '2018-05-07', close: 188.589996, }, { date: '2018-05-14', close: 186.309998, }, { date: '2018-05-21', close: 188.580002, }, { date: '2018-05-28', close: 190.240005, }, { date: '2018-06-04', close: 191.699997, }, { date: '2018-06-11', close: 188.839996, }, { date: '2018-06-18', close: 184.919998, }, { date: '2018-06-25', close: 185.110001, }, { date: '2018-07-02', close: 187.970001, }, { date: '2018-07-09', close: 191.330002, }, { date: '2018-07-16', close: 191.440002, }, { date: '2018-07-23', close: 190.979996, }, { date: '2018-07-30', close: 207.990005, }, { date: '2018-08-06', close: 207.529999, }, { date: '2018-08-13', close: 217.580002, }, { date: '2018-08-20', close: 216.160004, }, { date: '2018-08-27', close: 227.630005, }, { date: '2018-09-03', close: 221.300003, }, { date: '2018-09-10', close: 223.839996, }, { date: '2018-09-17', close: 217.660004, }, { date: '2018-09-24', close: 225.740005, }, { date: '2018-10-01', close: 224.289993, }, { date: '2018-10-08', close: 222.110001, }, { date: '2018-10-15', close: 219.309998, }, { date: '2018-10-22', close: 216.300003, }, { date: '2018-10-29', close: 207.479996, }, { date: '2018-11-05', close: 204.470001, }, { date: '2018-11-12', close: 193.529999, }, { date: '2018-11-19', close: 172.289993, }, { date: '2018-11-26', close: 178.580002, }, { date: '2018-12-03', close: 168.490005, }, { date: '2018-12-10', close: 165.479996, }, { date: '2018-12-17', close: 150.729996, }, { date: '2018-12-24', close: 156.229996, }, { date: '2018-12-31', close: 148.259995, }, { date: '2019-01-07', close: 152.289993, }, { date: '2019-01-14', close: 156.820007, }, { date: '2019-01-21', close: 157.759995, }, { date: '2019-01-28', close: 166.520004, }, { date: '2019-02-04', close: 170.410004, }, { date: '2019-02-11', close: 170.419998, }, { date: '2019-02-18', close: 172.970001, }, { date: '2019-02-25', close: 174.970001, }, { date: '2019-03-04', close: 172.910004, }, { date: '2019-03-11', close: 186.119995, }, { date: '2019-03-18', close: 191.050003, }, { date: '2019-03-25', close: 189.949997, }, { date: '2019-04-01', close: 197, }, { date: '2019-04-08', close: 198.869995, }, { date: '2019-04-15', close: 203.860001, }, { date: '2019-04-22', close: 205.279999, }, ];
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/24.1.7/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="https://unpkg.com/core-js@2.6.12/client/shim.min.js"></script> <script src="https://unpkg.com/systemjs@0.21.3/dist/system.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript"> System.import("./index.tsx"); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"></div> </div> </body> </html>
#chart { height: 440px; } .tooltip { width: 300px; }

You can set each annotation's type property to "text", "image", or "custom". Depending on the type, specify the text or image property. You can also add a description that will be displayed in a tooltip.

Annotations can be unattached or anchored to a chart element. In this demo, all annotations are anchored to series points via the argument and series properties. Refer to the annotations description for more information on how to position annotations.