Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lwc-plugin-visible-price-range-util

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lwc-plugin-visible-price-range-util

A plugin for providing a utility API to retrieve the visible range of a price scale, and subscribe to changes.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
271
increased by50.56%
Maintainers
1
Weekly downloads
 
Created
Source

Visible Price Range Util - Lightweight Charts™ Plugin

A plugin for providing a utility API to retrieve the visible range of a price scale, and subscribe to changes.

  • Developed for Lightweight Charts version: v4.1.0

Installation

npm install lwc-plugin-visible-price-range-util

Usage

import { VisiblePriceRangeUtil } from 'lwc-plugin-visible-price-range-util';

// Create an instantiated Visible Price Range Util primitive.
const vprUtil = new VisiblePriceRangeUtil();

// Create the chart and series...
const chart = createChart(document.getElementById('container'));
const lineSeries = chart.addLineSeries();
const data = [
    { time: 1642425322, value: 123 },
    /* ... more data */
];

// Attach the utility to the series
lineSeries.attachPrimitive(vprUtil);

const currentVisiblePriceRange = vprUtil.getVisiblePriceRange();
vprUtil.priceRangeChanged().subscribe(function(newRange) {
    if (!newRange) return;
    console.log(`Price Range is now from ${newRange.bottom} to ${newRange.top}`);
});

Developing

Running Locally

npm install
npm run dev

Visit localhost:5173 in the browser.

Compiling

npm run compile

Check the output in the dist folder.

Keywords

FAQs

Package last updated on 12 Oct 2023

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