fix stats

This commit is contained in:
shoopea 2021-12-09 21:53:14 +08:00
parent 4cecee1a0f
commit 9a08e0ce76
2 changed files with 9 additions and 9 deletions

10
bot.go
View File

@ -1176,7 +1176,7 @@ func botGraphMoney(m *tb.Message) {
return return
} }
dateFloat := float64(d.Year()) + float64(d.Month()-1)/12 dateFloat := float64(d.Year()) + float64(d.Month()-1)/12
valueFloat := float64(stat.CompanyValueLastQuarter) valueFloat := float64(stat.Money)
pt := plotter.XY{ pt := plotter.XY{
X: dateFloat, X: dateFloat,
Y: valueFloat / unitFactor, Y: valueFloat / unitFactor,
@ -1267,7 +1267,7 @@ func botGraphIncome(m *tb.Message) {
return return
} }
dateFloat := float64(d.Year()) + float64(d.Month()-1)/12 dateFloat := float64(d.Year()) + float64(d.Month()-1)/12
valueFloat := float64(stat.CompanyValueLastQuarter) valueFloat := float64(stat.Income)
pt := plotter.XY{ pt := plotter.XY{
X: dateFloat, X: dateFloat,
Y: valueFloat / unitFactor, Y: valueFloat / unitFactor,
@ -1358,7 +1358,7 @@ func botGraphLoan(m *tb.Message) {
return return
} }
dateFloat := float64(d.Year()) + float64(d.Month()-1)/12 dateFloat := float64(d.Year()) + float64(d.Month()-1)/12
valueFloat := float64(stat.CompanyValueLastQuarter) valueFloat := float64(stat.Loan)
pt := plotter.XY{ pt := plotter.XY{
X: dateFloat, X: dateFloat,
Y: valueFloat / unitFactor, Y: valueFloat / unitFactor,
@ -1449,7 +1449,7 @@ func botGraphPerf(m *tb.Message) {
return return
} }
dateFloat := float64(d.Year()) + float64(d.Month()-1)/12 dateFloat := float64(d.Year()) + float64(d.Month()-1)/12
valueFloat := float64(stat.CompanyValueLastQuarter) valueFloat := float64(stat.PerformancePreviousQuarter)
pt := plotter.XY{ pt := plotter.XY{
X: dateFloat, X: dateFloat,
Y: valueFloat / unitFactor, Y: valueFloat / unitFactor,
@ -1460,7 +1460,7 @@ func botGraphPerf(m *tb.Message) {
} }
p := plot.New() p := plot.New()
p.Title.Text = "Company Loan" p.Title.Text = "Company Perf"
p.X.Label.Text = "Year" p.X.Label.Text = "Year"
if unitName != "" { if unitName != "" {
p.Y.Label.Text = fmt.Sprintf("Value (%s)", unitName) p.Y.Label.Text = fmt.Sprintf("Value (%s)", unitName)

View File

@ -1,6 +1,6 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "be1712b" var githash = "4cecee1"
var buildstamp = "2021-12-09_13:41:53" var buildstamp = "2021-12-09_13:53:06"
var commits = "247" var commits = "248"
var version = "be1712b-b247 - 2021-12-09_13:41:53" var version = "4cecee1-b248 - 2021-12-09_13:53:06"