question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add the ability to drag custom price line and change its price

See original GitHub issue

Is your feature request related to a problem? Please describe.

No.

Describe the solution you’d like

Able to drag custom price line. Demo (The orders can be dragged in the price scale.)

I already have a patch implementing this. Might take some efforts to rebase and write test case etc. if this feature request is approved.

Additional context

Proposal:

  1. Add boolean parameter draggable to createPriceLine().
  2. Able to get “the price before dragging”. I think it should be stored as a string to preserve precisions? User can parse it later if needed.
  3. Change cursor when hovering over a draggable price line or dragging.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:12
  • Comments:9

github_iconTop GitHub Comments

7reactions
randalhsucommented, Sep 3, 2022

@shaunbeh Manually build lightweight-charts with the patch:

git clone https://github.com/tradingview/lightweight-charts.git
cd lightweight-charts
git checkout -b v3.8.0 tags/v3.8.0
wget https://github.com/randalhsu/OPAL/raw/main/lightweight-charts-patch/0002-Draggable-custom-price-line.patch
git am 0002-Draggable-custom-price-line.patch
npm install --legacy-peer-deps
npm run build:prod

You need to use this file: dist/lightweight-charts.standalone.production.js

0reactions
randalhsucommented, Dec 9, 2022

@felipecsl There’s no pull request yet. Thanks for helping, hope it gets merged soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize the Price Scale (logarithmic, labels, and lines)
This video shows you a simple tip for editing your chart: right -click on the price scale. This is a fast way to...
Read more >
Edit price and term details in the line items editor
You can edit the line items associated to your deals to customize the price and term information and calculate the deal amount.
Read more >
Charting in the Active Trader Pro Platforms
Add blank projection space to your chart by hovering your mouse over the right edge of the price pane until your cursor turns...
Read more >
Chart Settings - Sterling Trading Tech
Change order price by dragging – enables the ability to left click, drag and drop the open order line to change the order...
Read more >
Price Axis Settings - thinkorswim Learning Center
Fit high/low. Select this option to adjust the price axis so that it fits the highest and the lowest price of the entire...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found