Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
chartiq-react-app
Advanced tools
ChartIQ's full featured charting application written in ReactJS
The ChartIQ React application is a toolkit of components that enable you to build charting applications in the React framework. The components include everything from a basic chart to a complex, active trader desktop:
AdvancedChart
— Creates a full-featured chart with a fully developed user interfaceMultiChart
— Displays two advanced charts on screen simultaneouslyActiveTraderWorkstation
— Sets up an information-rich desktop for traders who trade frequentlyTermStructure
— Creates a term structure chart for working with non–time series dataCustomChart
— Integrates native React components with ChartIQ W3C-standard web componentsHelloWorld
— Creates a basic chart with no user interface as a starting point for your React appNote:
This application has been designed to simplify the transfer of modules such as src/chartiq/containers/ActiveTraderWorkstation
to other applications. We don't expect that developers will use the application as is with all modules included. So, to make transferring modules easier, we more or less duplicated resource and service files in each module.
For an example of creating a chart user interface entirely with native React components, see the chartiq-react-seed project.
A copy of the ChartIQ library, version 8.3.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.
To get a free trial version of the library, go to the ChartIQ download site.
To implement this project:
npm install ./chartiq-x.x.x.tgz
to install the charting librarynpm install
to install the rest of the dependenciesnpm start
to start up the development serverNote: When you are upgrading or changing your license, we recommend that you completely remove the old library before reinstalling the new one, for example:
npm uninstall chartiq
npm install ./chartiq-x.x.x.tgz
The Template.jsx files of the AdvancedChart
, ActiveTraderWorkstation
, and TermStructure
components and the render
method of CustomChart
contain JSX that is a collection of ChartIQ's user interface web components. You can customize the chart user interface by adding, removing, or modifying UI components. You can also add your own custom React components.
You can configure a variety of chart features by modifying the configuration object provided to the component definition files of AdvancedChart
, CustomChart
, ActiveTraderWorkstation
, and TermStructure
. Sample configurations are available as getConfig
and getCustomConfig
functions in the resources files.
A default configuration is part of the ChartIQ library. See the Chart Configuration tutorial for all the configuration details.
You can also modify the CSS in the style sheet files associated with AdvancedChart
, CustomChart
, and ActiveTraderWorkstation
. See the CSS Overview tutorial for information on customizing the chart look and feel.
ChartIQ web components can be customized by extending the web component classes. Customization code should run at the time the chart and user interface are created; that is, in the createChartAndUI
method. We recommend keeping all customization code in a single file or folder to simplify library version upgrades.
Here's an example of customizing the cq-chart-title
component:
// Access the web component classes.
import { CIQ } from 'chartiq/js/componentUI';
// Access the class definition of the web component.
const ChartTitle = CIQ.UI.components('cq-chart-title')[0].classDefinition;
// Extend the web component class.
class CustomChartTitle extends ChartTitle {
update() {
// Execute the original method.
super.update();
// Update the chart title.
const { symbol, symbolDisplay } = this.context.stx.chart;
// If symbolDisplay is available, use it in the document title.
if (symbolDisplay) {
document.title = document.title.replace(symbol, symbolDisplay);
}
}
}
// Update the web component definition.
CIQ.UI.addComponentDefinition('cq-chart-title', CustomChartTitle);
CustomChart
integrates native React components with ChartIQ's W3C-standard web components.
The RecentSymbols
component provides an example of wrapping and enhancing a web component with a React component. RecentSymbols
adds a RECENT tab to the lookup controls created by ChartIQ's cq-lookup
and cq-comparison-lookup
web components. The RECENT tab displays a list of recently used financial instrument symbols maintained by the RecentSymbols
component.
The ShortcutDialog
component is an example of a React component accessed by a web component. User interaction with a dropdown menu created by a ChartIQ cq-menu
web component opens the dialog box created by the ShortcutDialog
component. The dialog box enables users to set shortcut keys on the chart's drawing tools.
ChartIQ comes with a variety of plug-ins that add enhanced functionality to charts. The ChartIQ React application comes with the plug-ins built in but not enabled.
Note: Plug-ins are optional extras that must be purchased. To determine the plug-ins included in your library, see the ./node_modules/chartiq/plugins folder.
The application includes the ChartIQ plug-ins as component resources that are enabled by uncommenting the relevant imports in the component resources file.
For example, to enable the Trade from Chart (TFC) plug-in for AdvancedChart
, uncomment the following lines in the resources.js file in the ./src/chartiq/containers/AdvancedChart/ folder:
// import 'chartiq/plugins/tfc/tfc-loader';
// import 'chartiq/plugins/tfc/tfc-demo';
config.plugins = {
.
.
.
// tfc,
.
.
.
};
To enable the Market Depth chart and L2 Heat Map in AdvancedChart
, uncomment the following lines in resources.js:
// import 'chartiq/plugins/activetrader/cryptoiq';
// import 'chartiq/examples/feeds/L2_simulator'; /* for use with cryptoiq */
config.plugins = {
// marketDepth,
.
.
.
};
and the following lines in main.js:
// import { CIQ } from 'chartiq/js/componentUI';
// CIQ.simulateL2({ stx: chartEngine, onInterval: 1000, onTrade: true });
This application runs only from IP address 127.0.0.1
, hostname localhost
, or the explicit list of domains set on your ChartIQ license. If you need to bind the webpack development server to a different host, please contact your account manager to have additional domains added to your license.
If the web component polyfill is not required for supported browsers, the download size can be reduced by removing the polyfill script tag in the index.html file.
As of version 8.0.0 of the charting library, this project no longer supports Internet Explorer 11. Please contact support@chartiq.com for information on using version 7.5.0 of the charting library to enable this project to work with IE 11.
Fork it and send us a pull request. We'd love to see what you can do with our charting tools in React!
FAQs
ChartIQ's full featured charting application written in ReactJS
The npm package chartiq-react-app receives a total of 0 weekly downloads. As such, chartiq-react-app popularity was classified as not popular.
We found that chartiq-react-app demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.