Skip to content

Commit e9329e7

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent 3eb45c4 commit e9329e7

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
@@ -55,9 +55,9 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
5555
[3]: https://stackoverflow.com/questions/tagged/lightningchart
5656
[4]: https://lightningchart.com/support-services/
5757

58-
© LightningChart Ltd 2009-2025. All rights reserved.
58+
© LightningChart Ltd 2009-2026. All rights reserved.
5959

6060

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

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ const { createProgressiveTraceGenerator } = xydata
88
const dashboard = lightningChart({
99
resourcesBaseUrl: new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'resources/',
1010
}).Dashboard({
11-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
11+
theme: (() => {
12+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
13+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
14+
if (!window.__lcjsDebugOverlay) {
15+
window.__lcjsDebugOverlay = document.createElement('div')
16+
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'
17+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
18+
setInterval(() => {
19+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
20+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
21+
}, 500)
22+
}
23+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
24+
})(),
1225
numberOfRows: 1,
1326
numberOfColumns: 2,
1427
})

0 commit comments

Comments
 (0)