diff --git a/cointop/chart.go b/cointop/chart.go
index f0094c7..5f32ca4 100644
--- a/cointop/chart.go
+++ b/cointop/chart.go
@@ -266,6 +266,16 @@ func (ct *Cointop) PortfolioChart() error {
}
}
+ // Scale Portfolio Balances to hide value
+ if ct.State.hidePortfolioBalances {
+ var lastPrice = data[len(data)-1]
+ if lastPrice > 0.0 {
+ for i, price := range data {
+ data[i] = 100 * price / lastPrice
+ }
+ }
+ }
+
chart.SetData(data)
ct.State.chartPoints = chart.GetChartPoints(maxX)
diff --git a/cointop/marketbar.go b/cointop/marketbar.go
index 3adf857..5201c3f 100644
--- a/cointop/marketbar.go
+++ b/cointop/marketbar.go
@@ -71,6 +71,7 @@ func (ct *Cointop) UpdateMarketbar() error {
color24h = ct.colorscheme.MarketbarChangeDownSprintf()
arrow = "▼"
}
+ percentChange24Hstr := color24h(fmt.Sprintf("%.2f%%%s", percentChange24H, arrow))
chartInfo := ""
if !ct.State.hideChart {
@@ -84,13 +85,14 @@ func (ct *Cointop) UpdateMarketbar() error {
totalstr = fmt.Sprintf("%s%s", ct.CurrencySymbol(), totalstr)
if ct.State.hidePortfolioBalances {
totalstr = HiddenBalanceChars
+ percentChange24Hstr = HiddenBalanceChars
}
content = fmt.Sprintf(
"%sTotal Portfolio Value: %s • 24H: %s",
chartInfo,
ct.colorscheme.MarketBarLabelActive(totalstr),
- color24h(fmt.Sprintf("%.2f%%%s", percentChange24H, arrow)),
+ percentChange24Hstr,
)
} else {
ct.State.marketBarHeight = 1
diff --git a/docs/content/faq.md b/docs/content/faq.md
index f86bb18..dc4ee5f 100644
--- a/docs/content/faq.md
+++ b/docs/content/faq.md
@@ -187,7 +187,7 @@ draft: false
You can run cointop with the `--hide-portfolio-balances` flag to hide portfolio balances or use the keyboard shortcut Ctrl+space on the portfolio page to toggle hide/show.
-
+
## I'm getting question marks or weird symbols instead of the correct characters.