Socket
Socket
Sign inDemoInstall

@types/plotly.js

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/plotly.js

TypeScript definitions for plotly.js


Version published
Maintainers
1
Created

What is @types/plotly.js?

@types/plotly.js provides TypeScript definitions for the Plotly.js library, which is a graphing library that makes interactive, publication-quality graphs online. It supports a wide range of chart types and is highly customizable.

What are @types/plotly.js's main functionalities?

Basic Line Chart

This feature allows you to create a basic line chart. The code sample demonstrates how to define the data and layout for a simple line chart and render it using Plotly.

const trace1: Plotly.Data = { x: [1, 2, 3, 4], y: [10, 15, 13, 17], type: 'scatter' }; const layout: Partial<Plotly.Layout> = { title: 'Basic Line Chart' }; Plotly.newPlot('myDiv', [trace1], layout);

Bar Chart

This feature allows you to create a bar chart. The code sample shows how to define the data and layout for a bar chart and render it using Plotly.

const trace1: Plotly.Data = { x: ['A', 'B', 'C'], y: [20, 14, 23], type: 'bar' }; const layout: Partial<Plotly.Layout> = { title: 'Bar Chart' }; Plotly.newPlot('myDiv', [trace1], layout);

3D Surface Plot

This feature allows you to create a 3D surface plot. The code sample demonstrates how to define the data and layout for a 3D surface plot and render it using Plotly.

const data: Plotly.Data[] = [{ z: [[1, 2, 3], [4, 5, 6], [7, 8, 9]], type: 'surface' }]; const layout: Partial<Plotly.Layout> = { title: '3D Surface Plot' }; Plotly.newPlot('myDiv', data, layout);

Other packages similar to @types/plotly.js

FAQs

Package last updated on 16 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc