-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: overlay align to the right when no left/right price scale defined …
- Loading branch information
Showing
4 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/e2e/graphics/test-cases/series/overlay-series-title-only-overlay-price-scale.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
function generateData(func) { | ||
const res = []; | ||
const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)); | ||
for (let i = 0; i < 500; ++i) { | ||
res.push({ | ||
time: time.getTime() / 1000, | ||
value: func(i), | ||
}); | ||
|
||
time.setUTCDate(time.getUTCDate() + 1); | ||
} | ||
return res; | ||
} | ||
|
||
function runTestCase(container) { | ||
const chart = LightweightCharts.createChart(container); | ||
|
||
const line1 = chart.addLineSeries({ | ||
priceScaleId: 'overlay', | ||
color: 'rgb(255, 0, 0)', | ||
title: 'SIN', | ||
}); | ||
const line2 = chart.addLineSeries({ | ||
priceScaleId: 'overlay', | ||
color: 'rgb(0, 255, 0)', | ||
title: 'COS', | ||
}); | ||
|
||
line1.setData(generateData(Math.sin)); | ||
line2.setData(generateData(Math.cos)); | ||
} |