Skip to content

Commit 5de6658

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent c2c4815 commit 5de6658

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
7777
[3]: https://stackoverflow.com/questions/tagged/lightningchart
7878
[4]: https://lightningchart.com/support-services/
7979

80-
© LightningChart Ltd 2009-2025. All rights reserved.
80+
© LightningChart Ltd 2009-2026. All rights reserved.
8181

8282

83-
[LightningChart]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/functions/lightningChart-1.html
84-
[Automatic tick placement strategies]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/variables/AxisTickStrategies.html
85-
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/ChartXY.html
86-
[Axis XY]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/Axis.html
87-
[Line Series XY]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/PointLineAreaSeries.html
83+
[LightningChart]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/functions/lightningChart-1.html
84+
[Automatic tick placement strategies]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/variables/AxisTickStrategies.html
85+
[Chart XY]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/ChartXY.html
86+
[Axis XY]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/Axis.html
87+
[Line Series XY]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/PointLineAreaSeries.html
8888

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,20 @@ const chart = lightningChart({
1717
})
1818
.ChartXY({
1919
legend: { visible: false },
20-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
20+
theme: (() => {
21+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
22+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
23+
if (!window.__lcjsDebugOverlay) {
24+
window.__lcjsDebugOverlay = document.createElement('div')
25+
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'
26+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
27+
setInterval(() => {
28+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
29+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
30+
}, 500)
31+
}
32+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
33+
})(),
2134
})
2235
.setTitle('TimeTickStrategy example')
2336

0 commit comments

Comments
 (0)