From 12a67fcc4cf0ae0b1b8cb730500723fe4024ab29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niilo=20Kein=C3=A4nen?= Date: Wed, 8 Nov 2023 11:17:09 +0200 Subject: [PATCH] LCJS v5.0.1 --- README.md | 12 ++++++------ src/index.js | 12 +++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e7a985d..f33d947 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,10 @@ Direct developer email support can be purchased through a [Support Plan][4] or b © LightningChart Ltd 2009-2022. All rights reserved. -[Bar Chart]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/interfaces/BarChart.html -[Bar Chart Bar]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/ -[Bar Chart Value Axis ]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/classes/BarChartValueAxis.html -[Bar Chart Category Axis]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/classes/BarChartCategoryAxis.html -[Bar Chart Types]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/ -[Bar Chart Sorting]: https://lightningchart.com/js-charts/api-documentation/v4.2.0/ +[Bar Chart]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/interfaces/BarChart.html +[Bar Chart Bar]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/ +[Bar Chart Value Axis ]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/classes/BarChartValueAxis.html +[Bar Chart Category Axis]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/classes/BarChartCategoryAxis.html +[Bar Chart Types]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/ +[Bar Chart Sorting]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/ diff --git a/src/index.js b/src/index.js index 895617c..9931b27 100644 --- a/src/index.js +++ b/src/index.js @@ -91,20 +91,26 @@ const barChart = lightningChart().BarChart({ const barDiv = barChart.engine.container +const inputDiv = document.createElement('div') +barDiv.append(inputDiv) +inputDiv.style.position = "absolute" +inputDiv.style.top = "0" + + const label = document.createElement('label') -barDiv.append(label) +inputDiv.append(label) label.innerHTML = "Number of bins:" label.style.position = "relative" const binInput = document.createElement('input') -barDiv.append(binInput) +inputDiv.append(binInput) barChart.setTitleMargin({top: 25, bottom: -10}) binInput.type = "number" binInput.min = "1" binInput.max = "1000" binInput.value = "100" binInput.style.position = "relative" -binInput.style.height = "5%" +binInput.style.height = "30px" binInput.addEventListener('input', () => { const inputValue = parseInt(binInput.value)