Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@chartiq/react-components
Advanced tools
The ChartIQ React Components is a React component library featuring several advanced components that can be easily imported into an existing React application.
A copy of the ChartIQ library, version 8.4.0 or later.
If you do not have a copy of the library, please contact your account manager or send an email to info@cosaic.io.
NOTE While you can install the React components, they do require the ChartIQ library to work. If you do not have a copy of the library you may evaluate one from here.
The exported components include:
After installing this package into your React project you will need to install the ChartIQ library (included separately).
npm install chartiq-8.4.0 // or whatever version you are using!
You can then import one of the included components into your React app:
import { AdvancedChart } from "@chartiq/react-components"
export default function Chart() {
return <AdvancedChart />
}
All components work with the default configuration for the chart which can be modified to enable various features, set chart properties, load data, setup quotefeeds and more (for full documentation see ChartIQ Default Chart Configuration).
There are two ways you can get the config for a component. You can import getConfig
or getCustomConfig
from the components resources file. Each will return a chart config object that you can adjust.
The getConfig
method will import the defaultConfig from the ChartIQ SDK and add the quoteFeedSimulator so you can immediately get started developing with simulated data.
The getCustomConfig
method will return a specific config for each component. If you do not provide a config prop, this is what will be used.
import {
getConfig,
getCustomConfig
} from @chartiq/react-components/containers/AdvancedChart/resources
const config = getConfig()
config.initialSymbol = 'FB'
Each method accepts a resources object where you can pass a quotefeed, nameValueStore, and more. Full documentation can be found here
By default all components will load the quoteFeedSimulator so that you have some working data to get started with. When you are ready to add your own quotefeed, it should be aded to the config prop passed into the chart component.
After importing your own quotefeed, and getting a config to pass into the chart, assign your quotefeeed to the config and pass it to the component as a prop.
import MyCustomQuotefeed from './myCustomQuotefeed'
import { getCustomConfig } from '@chartiq/react-components/containers/AdvancedChart/resources'
const config = getCustomConfig({ resources: { quoteFeed: myCustomQuoteFeed }})
<AdvancedChart config={config}/>
Every component accepts children that it will render instead of its default JSX template.
The chart configuration includes the default Lookup.ChartIQ implementation but you can substitute your own lookup driver to power symbol searches. After getting a config object you can assign a custom lookup.
import customSymbolLookup from './myCustomSymbolLookup'
import { getCustomConfig } from '@chartiq/react-components/containers/AdvancedChart/resources'
const config = getCustomConfig()
config.lookupDriver = customSymbolLookup
<AdvancedChart config={config}/>
More information about Lookup Drivers can be found in the data integration ChartIQ Documentation.
FAQs
React Components for ChartIQ library
The npm package @chartiq/react-components receives a total of 61 weekly downloads. As such, @chartiq/react-components popularity was classified as not popular.
We found that @chartiq/react-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.