4.24.4 • Published 2 days ago

@cdc/dashboard v4.24.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 days ago

@cdc/dashboard

npm

<CdcDashboard /> is a React component produced by the CDC for combining multiple visualizations into a single module. Some supported visualization types are CdcMap and CdcChart. 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/dashboard
  2. Import the component and begin using in your code.
import CdcChart from '@cdc/dashboard'

function App() {

  return (
    <div className="App">
      <CdcDashboard 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/dashboard/examples.

Properties

PropertyTypeDescription
configStringA JavaScript object with the configuration for the dashboard. Pass either this or the configUrl property to setup your dashboard.
configUrlStringPass a URL to a .json file and it will be consumed and used as the configuration.