plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Typescript - Uniform Text

Open jbest84 opened this issue 6 years ago • 1 comments

It appears the uniformtext layout property is not included in the typings. I was able to work around this by extending the type as such:

  type ExtLayout = Partial<Plotly.Layout> & {
    uniformtext?: {
      mode?: false | 'hide' | 'show',
      minsize?: number,
    }
  };

  type ExtPlotParams = PlotParams & { 
    layout: ExtLayout,
  };

  type ExtPlot = React.ComponentType<ExtPlotParams>

Versions: "@types/plotly.js": "^1.50.18" "@types/react-plotly.js": "^2.2.4" "plotly.js": "^1.55.2"

jbest84 avatar Sep 14 '20 15:09 jbest84

Thanks for letting us know! You'll probably want to make a PR for this to the types project, as this is not something the Plotly.js maintainers do on a regular basis.

nicolaskruchten avatar Sep 14 '20 16:09 nicolaskruchten