Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom price lines should be atop of the series #684

Closed
christose opened this issue Jan 22, 2021 · 3 comments · Fixed by #806
Closed

Custom price lines should be atop of the series #684

christose opened this issue Jan 22, 2021 · 3 comments · Fixed by #806
Labels
breaking change Changes the API in a non backwards compatible way. bug Unexpected problem or unintended behavior.
Milestone

Comments

@christose
Copy link
Contributor

Lightweight Charts Version:

Steps/code to reproduce:
By setting a custom price line in the series, it gets override from the series graph.

var priceLine = {
      price: 1.21781,
      color: "#ffffff",
      lineWidth: 1,
      lineStyle: LineStyle.Solid,
      axisLabelVisible: true,
    } as PriceLineOptions;

if (this.PriceLine == null) {
        this.PriceLine = this.ChartSeries.createPriceLine(priceLine);
      }
      else {
        this.PriceLine.applyOptions(priceLine);
      }

Actual behavior:

Expected behavior:
The expected behavior is the price line to be on top of any series elements like a candlestick or a line, area etc.

Screenshots:
image
image

CodeSandbox/JSFiddle/etc link:

@timocov timocov added breaking change Changes the API in a non backwards compatible way. bug Unexpected problem or unintended behavior. good first issue Good issue for first-time contributors. help wanted Asking for outside help and/or contributions to this particular issue or PR. labels Jan 25, 2021
@timocov timocov added this to the 4.0 milestone Jan 25, 2021
@timocov timocov changed the title Custom price line gets override from the series elements Custom price lines should be atop of the series Jan 25, 2021
@timocov
Copy link
Contributor

timocov commented Jan 25, 2021

Related to #681

It seems that it's intended right now, but I think it's strange and we have to change that.

@gkrasulya
Copy link

Hi. Could you please point out what place in code should be fixed? I may try to create pull request

@timocov
Copy link
Contributor

timocov commented Jun 10, 2021

All should be done here is move this code after res.push(this._priceLineView); line. I think that's it. But please keep in mind that since it's breaking change we cannot merge it in the following 3.4 release so it will wait for 4.0 (which we're planning right after 3.4 if nothing is changed).

gkrasulya added a commit to gkrasulya/lightweight-charts that referenced this issue Jun 14, 2021
Custom price lines should be atop of the series tradingview#684
@timocov timocov removed help wanted Asking for outside help and/or contributions to this particular issue or PR. good first issue Good issue for first-time contributors. labels Nov 3, 2021
@timocov timocov closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes the API in a non backwards compatible way. bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants