Skip to content

Commit 8f18005

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent 14d87cd commit 8f18005

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
8484
[3]: https://stackoverflow.com/questions/tagged/lightningchart
8585
[4]: https://lightningchart.com/support-services/
8686

87-
© LightningChart Ltd 2009-2025. All rights reserved.
87+
© LightningChart Ltd 2009-2026. All rights reserved.
8888

8989

90-
[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/ChartXY.html
91-
[Area point]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/interfaces/AreaPoint.html
92-
[Area Range series]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/AreaRangeSeries.html
90+
[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/ChartXY.html
91+
[Area point]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/interfaces/AreaPoint.html
92+
[Area Range series]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/AreaRangeSeries.html
9393

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,20 @@ const chart = lightningChart({
1313
resourcesBaseUrl: new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'resources/',
1414
})
1515
.ChartXY({
16-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
16+
theme: (() => {
17+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
18+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
19+
if (!window.__lcjsDebugOverlay) {
20+
window.__lcjsDebugOverlay = document.createElement('div')
21+
window.__lcjsDebugOverlay.style.cssText = 'position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);color:#fff;padding:4px 8px;z-index:99999;font:12px monospace;pointer-events:none'
22+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
23+
setInterval(() => {
24+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
25+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
26+
}, 500)
27+
}
28+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
29+
})(),
1730
})
1831
.setTitle('Daily temperature range, April 2019')
1932

0 commit comments

Comments
 (0)