@splunk/react-visualizations
v26.4.1
Published
If you're currently using or planning to use this package, please consider moving to `@splunk/visualizations` as we will stop publishing bugfixes and features for this package.
Downloads
2,810
Readme
⚠️ This package has been deprecated
If you're currently using or planning to use this package, please consider moving to @splunk/visualizations
as we will stop publishing bugfixes and features for this package.
Read more about the deprecation and how to migrate in our migration doc
General
React visualizations are react visualization components. They are designed to be standalone components that can be used without dashboard framework.
React visualizations would not understand the result from Splunk SPL.
Install
Install @splunk/react-visualizations
- Install peer dependencies
npm install react@^16 react-dom@^16 styled-components@5 --save
- Install the visualizations package
npm install @splunk/react-visualizations
Using the Components
Use as React component.
import React from 'react';
import SingleValue from '@splunk/react-visualizations/SingleValue';
export default () => (
<SingleValue
value={1320}
deltaValue={390}
graphData={['5', '42', '206', '482', '678', '745', '893', '3278']}
unit={'$'}
unitPosition={'before'}
sparklinePosition={'after'}
/>
);