@cdc/data-bite

4.24.4 • Public • Published

@cdc/data-bite

npm

<CdcDataBite /> is a React component produced by the CDC for highlighting/displaying a single piece of data in a card format. This package is part of the larger CDC Open Visualization project.

Installation and Usage

  1. Install the package in your React project npm install @cdc/data-bite
  2. Import the component and begin using in your code.
import CdcDataBite from '@cdc/data-bite'

function App() {

  return (
    <div className="App">
      <CdcDataBite config={configObj} />
    </div>
  );
}

export default App;

Note, you must pass in a configuration object. Configuration objects can be created with the Editor package.

Sample config data can be found in packages/data-bite/examples.

Properties

Property Type Description
config String A JavaScript object with the configuration for the data bite. Pass either this or the configUrl property to setup your chart.

Readme

Keywords

none

Package Sidebar

Install

npm i @cdc/data-bite

Weekly Downloads

80

Version

4.24.4

License

Apache-2.0

Unpacked Size

952 kB

Total Files

37

Last publish

Collaborators

  • mpallansch
  • adoe
  • cooms13