Kaktana / kaktana-react-lightweight-charts

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

timeScale tickMarkFormatter property not working #8

Closed nicholas-newman1 closed 3 years ago

nicholas-newman1 commented 3 years ago

Code

import Chart from 'kaktana-react-lightweight-charts';

const stockChart = () => {
  return (
    <Chart options={{
      timeScale: {
        borderColor: '#fff',
        tickMarkFormatter: time => 'TEST'
      }
    }} />
  )
};

export default stockChart;

Expected Result Each tick mark on the time scale should say 'TEST'. Border color should be white.

Actual Result No change in what each tick mark displays. Border color does change to white.

nemani commented 3 years ago

Not sure if this will help but check the docs of tradingview/lightweight-charts at v2.0.0 which is what this repo uses. :)

AurelReb commented 3 years ago

@nicholas-newman1 Could you send me a Codesandbox link so I can easily review your issue? Thanks :)

nicholas-newman1 commented 3 years ago

@AurelReb It looks like the tickMarkFormatter method was added in v3.0 of lightweight charts, which explains why adding in the property does nothing. Thanks anyways!

KmaCoder commented 3 years ago

As I can see in dependencies, now version 3.3 is used, but anyway tickMarkFormatter doesn't work