Change various widget field names

This commit is contained in:
Caleb Bassi
2019-02-23 17:15:42 -08:00
parent fd5a830d7a
commit 3006e4efe4
12 changed files with 89 additions and 89 deletions

View File

@@ -36,8 +36,8 @@ func main() {
pc.Title = "Pie Chart"
pc.SetRect(5, 5, 70, 36)
pc.Data = []float64{.25, .25, .25, .25}
pc.Offset = -.5 * math.Pi
pc.Label = func(i int, v float64) string {
pc.AngleOffset = -.5 * math.Pi
pc.LabelFormatter = func(i int, v float64) string {
return fmt.Sprintf("%.02f", v)
}
@@ -66,7 +66,7 @@ func main() {
}
case <-ticker:
if run {
pc.Data, pc.Offset = randomDataAndOffset()
pc.Data, pc.AngleOffset = randomDataAndOffset()
ui.Render(pc)
}
}

View File

@@ -44,7 +44,7 @@ func main() {
p1.Marker = widgets.MarkerDot
p1.Data = [][]float64{[]float64{1, 2, 3, 4, 5}}
p1.SetRect(50, 0, 75, 10)
p1.DotRune = '+'
p1.DotMarkerRune = '+'
p1.AxesColor = ui.ColorWhite
p1.LineColors[0] = ui.ColorYellow
p1.DrawDirection = widgets.DrawLeft
@@ -58,7 +58,7 @@ func main() {
p2.SetRect(0, 15, 50, 30)
p2.AxesColor = ui.ColorWhite
p2.LineColors[0] = ui.ColorCyan
p2.Type = widgets.ScatterPlot
p2.PlotType = widgets.ScatterPlot
p3 := widgets.NewPlot()
p3.Title = "braille-mode Scatter Plot"
@@ -69,7 +69,7 @@ func main() {
p3.AxesColor = ui.ColorWhite
p3.LineColors[0] = ui.ColorCyan
p3.Marker = widgets.MarkerBraille
p3.Type = widgets.ScatterPlot
p3.PlotType = widgets.ScatterPlot
ui.Render(p0, p1, p2, p3)

View File

@@ -37,7 +37,7 @@ func main() {
[]string{"2016", "11", "11"},
}
table2.TextStyle = ui.NewStyle(ui.ColorWhite)
table2.TextAlign = ui.AlignCenter
table2.TextAlignment = ui.AlignCenter
table2.RowSeparator = false
table2.SetRect(0, 10, 20, 20)