Skip to content

Commit 1646a6d

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent c13fc18 commit 1646a6d

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

README.md

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

86-
© LightningChart Ltd 2009-2025. All rights reserved.
86+
© LightningChart Ltd 2009-2026. All rights reserved.
8787

8888

89-
[Dashboard]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/Dashboard.html
90-
[Map chart]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/MapChart.html
91-
[Map types]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/variables/MapTypes.html
92-
[Color look up table]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/LUT.html
93-
[Paletted fill style]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/PalettedFill.html
94-
[Color factory RGBA]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/functions/ColorRGBA.html
95-
[UI element builders]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/variables/UIElementBuilders.html
96-
[UI layout builders]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/variables/UILayoutBuilders.html
89+
[Dashboard]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/Dashboard.html
90+
[Map chart]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/MapChart.html
91+
[Map types]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/variables/MapTypes.html
92+
[Color look up table]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/LUT.html
93+
[Paletted fill style]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/PalettedFill.html
94+
[Color factory RGBA]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/functions/ColorRGBA.html
95+
[UI element builders]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/variables/UIElementBuilders.html
96+
[UI layout builders]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/variables/UILayoutBuilders.html
9797

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ const {
2020
const dashboard = lightningChart({
2121
resourcesBaseUrl: new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'resources/',
2222
}).Dashboard({
23-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
23+
theme: (() => {
24+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
25+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
26+
if (!window.__lcjsDebugOverlay) {
27+
window.__lcjsDebugOverlay = document.createElement('div')
28+
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'
29+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
30+
setInterval(() => {
31+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
32+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
33+
}, 500)
34+
}
35+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
36+
})(),
2437
numberOfColumns: 3,
2538
numberOfRows: 2,
2639
})

0 commit comments

Comments
 (0)