Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI
This commit is contained in:
1822 files changed
+24568
-21314
No files matched your search
@@ -8,16 +8,16 @@
|
||||
|
||||
```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
|
||||
drawings := mujica.DrawingTools{Tool: mujica.ToolTrendLine}
|
||||
var window chart.MarketView
|
||||
drawings := chart.DrawingTools{Tool: chart.ToolTrendLine}
|
||||
view := func(c *ui.Context) {
|
||||
mujica.Use(c, mujica.Settings{})
|
||||
mujica.CandlestickChart(c, candles, &window, mujica.CandlestickOptions{Frame: mujica.ChartFrame{Label: "BTC", Height: 200}, Drawings: &drawings})
|
||||
core.Use(c, core.Settings{})
|
||||
chart.CandlestickChart(c, candles, &window, chart.CandlestickOptions{Frame: chart.ChartFrame{Label: "BTC", Height: 200}, Drawings: &drawings})
|
||||
}
|
||||
ui.Render(view, 640, 400, 1)
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user