Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 16:18:48 -04:00
1 parent 5a7e921c7e
commit 22b53e9e9e
1822 files changed
+24568 -21314

No files matched your search

+6 -6
View File
@@ -8,17 +8,17 @@
```go
at := time.Date(2026, 10, 5, 9, 0, 0, 0, time.UTC)
candles := []mujica.Candle{
candles := []chart.Candle{
{Time: at, Open: 100, High: 103, Low: 99, Close: 102, Volume: 1200},
{Time: at.Add(time.Hour), Open: 102, High: 104, Low: 100, Close: 101, Volume: 1600},
{Time: at.Add(2 * time.Hour), Open: 101, High: 105, Low: 100, Close: 104, Volume: 900},
}
var window mujica.MarketView
symbols := []mujica.CompareSymbol{{Name: "ETH", Closes: []float64{20, 21, 23}}}
var window chart.MarketView
symbols := []chart.CompareSymbol{{Name: "ETH", Closes: []float64{20, 21, 23}}}
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
mujica.CompareLegend(c, &symbols)
mujica.CandlestickChart(c, candles, &window, mujica.CandlestickOptions{Frame: mujica.ChartFrame{Label: "BTC", Height: 200}, Compare: &symbols})
core.Use(c, core.Settings{})
chart.CompareLegend(c, &symbols)
chart.CandlestickChart(c, candles, &window, chart.CandlestickOptions{Frame: chart.ChartFrame{Label: "BTC", Height: 200}, Compare: &symbols})
}
ui.Render(view, 640, 400, 1)
```