mirror of https://github.com/mum4k/termdash.git
Finished changes for BarChart and updated CHNAGELOG.
This commit is contained in:
parent
3e8466282e
commit
1ab50bcefc
|
@ -19,8 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Termbox is now initialized in 256 color mode by default.
|
||||
- Generalized mouse button FSM for use in widgets that need to track mouse
|
||||
button clicks.
|
||||
- The constructor of the LineChart widget now also returns an error so that it
|
||||
can validate its options. This is a breaking change on the LineChart API.
|
||||
|
||||
#### Breaking API changes
|
||||
|
||||
- The constructors of all the widgets now also return an error so that they
|
||||
can validate the options. This is a breaking change for the following
|
||||
widgets: BarChart, Gauge, SparkLine, Text. The callers will have to handle
|
||||
the returned error.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -106,6 +106,11 @@ func layout(ctx context.Context, t terminalapi.Terminal) (*container.Container,
|
|||
),
|
||||
}
|
||||
|
||||
bc, err := newBarChart(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
don, err := newDonut(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -120,7 +125,7 @@ func layout(ctx context.Context, t terminalapi.Terminal) (*container.Container,
|
|||
container.Top(
|
||||
container.Border(draw.LineStyleLight),
|
||||
container.BorderTitle("BarChart"),
|
||||
container.PlaceWidget(newBarChart(ctx)),
|
||||
container.PlaceWidget(bc),
|
||||
container.BorderTitleAlignRight(),
|
||||
),
|
||||
container.Bottom(
|
||||
|
|
Loading…
Reference in New Issue