Skip to content

Commit

Permalink
Make bar diagram component (#81)
Browse files Browse the repository at this point in the history
* feat: barDiagram-component with axes and bars (bars have calculated positions, but not the text)

* feat: customizable axistitles and axisunits

* feat: allow user-specified positioning of the bar diagram

* feat: plotting of data will always have same height

* feat: yAxisTitle and values for horizontal lines will be moved outwards based on the length of the values

* feat: the barDiagram has a maxLength and the bars will be distributed evenly based on this

* feat: added title option to add title to diagram

* Structured the code more clearly

* feat: add possibility for negative bars

* feat: can now add negative bars, but maxHeight of diagram is not calculated based on the negative numbers as well

* feat: axis-units are optional

* feat: function for switching two bars (but height is not calculated correctly)

* feat: can set color for a bar inputing a hexcode

* feat: move xAxisTitle if there are negative bars. maxHeight works for bars and axes. However, HorizontalLines are not correct when having floats

* feat: adding horizontalLines now work

* feat: added comments to explain code

* fix: xAxisTitle will be place correctly (with or without unit behind it) when the bardiagram has negative bars

* linting problems fixed

* fix index.ts to include bardiagram and fix bardiagram.ts to use the existing InputPosition

* fix package.json
  • Loading branch information
Kristiantvaa authored Jul 4, 2024
1 parent 9fa6c62 commit 7c774be
Show file tree
Hide file tree
Showing 3 changed files with 423 additions and 3 deletions.
Loading

0 comments on commit 7c774be

Please sign in to comment.