Skip to content

Commit c2c6b95

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent 3849f50 commit c2c6b95

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
@@ -66,10 +66,10 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
6666
[3]: https://stackoverflow.com/questions/tagged/lightningchart
6767
[4]: https://lightningchart.com/support-services/
6868

69-
© LightningChart Ltd 2009-2025. All rights reserved.
69+
© LightningChart Ltd 2009-2026. All rights reserved.
7070

7171

72-
[Data Grid]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/DataGrid.html
73-
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/ChartXY.html
74-
[Spark Chart]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/types/SparkChart.html
72+
[Data Grid]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/DataGrid.html
73+
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/ChartXY.html
74+
[Spark Chart]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/types/SparkChart.html
7575

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,20 @@ const setDrillDown = (() => {
6363
legend: { visible: false },
6464
container: containerDrilldown,
6565
defaultAxisX: { type: 'linear-highPrecision' },
66-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
66+
theme: (() => {
67+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
68+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
69+
if (!window.__lcjsDebugOverlay) {
70+
window.__lcjsDebugOverlay = document.createElement('div')
71+
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'
72+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
73+
setInterval(() => {
74+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
75+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
76+
}, 500)
77+
}
78+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
79+
})(),
6780
})
6881
.setTitle(name)
6982
.setCursor((cursor) => cursor.setTickMarkerXVisible(false))

0 commit comments

Comments
 (0)