Skip to content

Commit f8b3a63

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent fb382a0 commit f8b3a63

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

README.md

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

56-
© LightningChart Ltd 2009-2025. All rights reserved.
56+
© LightningChart Ltd 2009-2026. All rights reserved.
5757

5858

59-
[Data Grid]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/DataGrid.html
60-
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/ChartXY.html
59+
[Data Grid]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/DataGrid.html
60+
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/ChartXY.html
6161

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,20 @@ const dashboard = lightningChart({
3333
resourcesBaseUrl: new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'resources/',
3434
})
3535
.Dashboard({
36-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
36+
theme: (() => {
37+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
38+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
39+
if (!window.__lcjsDebugOverlay) {
40+
window.__lcjsDebugOverlay = document.createElement('div')
41+
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'
42+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
43+
setInterval(() => {
44+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
45+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
46+
}, 500)
47+
}
48+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
49+
})(),
3750
numberOfColumns: 1,
3851
numberOfRows: 2,
3952
})

0 commit comments

Comments
 (0)