Skip to content

Commit bc59c7a

Browse files
author
Niilo Keinänen
committed
Update examples
1 parent 244f305 commit bc59c7a

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

70-
© LightningChart Ltd 2009-2025. All rights reserved.
70+
© LightningChart Ltd 2009-2026. All rights reserved.
7171

7272

73-
[Bar chart]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/BarChart.html
74-
[Bar chart Value Axis]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/BarChartValueAxis.html
75-
[Bar chart Category Axis]: https://lightningchart.com/js-charts/api-documentation/v8.1.0/classes/BarChartCategoryAxis.html
73+
[Bar chart]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/BarChart.html
74+
[Bar chart Value Axis]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/BarChartValueAxis.html
75+
[Bar chart Category Axis]: https://lightningchart.com/js-charts/api-documentation/v8.2.0/classes/BarChartCategoryAxis.html
7676

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,20 @@ const barChart = lightningChart({
1111
resourcesBaseUrl: new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'resources/',
1212
})
1313
.BarChart({
14-
theme: Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined,
14+
theme: (() => {
15+
const t = Themes[new URLSearchParams(window.location.search).get('theme') || 'darkGold'] || undefined
16+
const smallView = Math.min(window.innerWidth, window.innerHeight) < 500
17+
if (!window.__lcjsDebugOverlay) {
18+
window.__lcjsDebugOverlay = document.createElement('div')
19+
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'
20+
if (document.body) document.body.appendChild(window.__lcjsDebugOverlay)
21+
setInterval(() => {
22+
if (!window.__lcjsDebugOverlay.parentNode && document.body) document.body.appendChild(window.__lcjsDebugOverlay)
23+
window.__lcjsDebugOverlay.textContent = window.innerWidth + 'x' + window.innerHeight + ' dpr=' + window.devicePixelRatio + ' small=' + (Math.min(window.innerWidth, window.innerHeight) < 500)
24+
}, 500)
25+
}
26+
return t && smallView ? lcjs.scaleTheme(t, 0.5) : t
27+
})(),
1528
})
1629
.setTitle('Grouped Bars (Employee Count)')
1730
.setValueLabels(undefined)

0 commit comments

Comments
 (0)