Skip to content

Commit

Permalink
LCJS v5.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Niilo Keinänen committed Nov 8, 2023
1 parent 7e84fba commit 12a67fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

12 changes: 9 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12a67fc

Please sign in to comment.