Kaktana / kaktana-react-lightweight-charts

A simple react wrapper for the tradingview lightweight charts module
MIT License
106 stars 55 forks source link

How to use normal mode of the crosshair #17

Closed ParanoidAndroid19 closed 3 years ago

ParanoidAndroid19 commented 3 years ago

I want to use the normal mode of crosshair instead of the default magnet mode. This feature: https://github.com/tradingview/lightweight-charts/blob/master/docs/constants.md#crosshairmode

So far I have tried these, but none worked: crosshair: { mode: "normal" }, crosshair: { mode: CrosshairMode.Normal }, crosshair: { mode: 1 }, crosshair: { mode: 2 },

Thanks!

ParanoidAndroid19 commented 3 years ago

Found the solution.

import Chart, { CrosshairMode } from "kaktana-react-lightweight-charts";

crosshair: { mode: CrosshairMode.Normal },