- Since:
-
10.3.0
Methods
-
CompactChartComponent(props)
-
A CompactChart React wrapper component.
Parameters:
Name Type Description propsCompactChartComponentProps Component properties.
- Since:
-
10.3.0
Returns:
A React component wrapping a CompactChart.
- Type
- React.ReactNode
Example
Creating the wrapper component in a JSX. Full example can be found in react-example folder in your distribution.
const App = () => { // This will be the instance of the CompactChart created by the component. const handle = useRef({}); return ( <div style={{ marginLeft: "15px" }}> <CompactChartComponent chartHandle={handle} compactChartClass={CompactChart} config={config} containerWidth={"100%"} containerHeight={"600px"} /> </div> ); };
Type Definitions
-
CompactChartComponentProps
-
Properties consumed by the CompactChartComponent.
Type:
- object
- Since:
-
10.3.0
Properties:
Name Type Argument Default Description chartHandleReact.RefObject.<(CompactChartHandle|null)> <optional>
Ref of the component, to contain a handle to the CompactChart instance created.
compactChartClassCompactChart The CompactChart class. This will be used to create the chart.
configConfig The chart configuration object. This config is overlaid onto the config specified by the configTemplate field.
containerWidthstring <optional>
'100%' The width of the chart container.
containerHeightstring <optional>
'200px' The height of the chart container.
-
CompactChartHandle
-
Describes what is in the Ref.
Type:
- object
- Since:
-
10.3.0
Properties:
Name Type Argument Description chartCompactChart <optional>
The CompactChart instance.
-
StaticData
-
A useful type to cast static data when used in the CompactChart configuration.
Type:
- Array.<PriceRecord>
- Since:
-
10.3.0
