@@ -97,7 +97,7 @@ defmodule FullstackWeb.Public.TransactionsLive.PublicTransactions do
97
97
end
98
98
99
99
defp make_point_plot ( data , bar_options , selected_bar ) do
100
- series_cols = [ "Count" , "Amount " ]
100
+ series_cols = [ "Count" , "$ k " ]
101
101
test_data = Dataset . new ( data , [ "Day" | series_cols ] )
102
102
103
103
options = [
@@ -125,7 +125,7 @@ defmodule FullstackWeb.Public.TransactionsLive.PublicTransactions do
125
125
defp make_red_plot ( data ) do
126
126
Sparkline . new ( data )
127
127
|> Sparkline . colours ( "#fad48e" , "#ff9838" )
128
- |> Map . update! ( :height , fn _ -> 60 end )
128
+ |> Map . update! ( :height , fn _ -> 30 end )
129
129
|> Map . update! ( :width , fn _ -> 150 end )
130
130
|> Sparkline . draw ( )
131
131
end
@@ -145,9 +145,14 @@ defmodule FullstackWeb.Public.TransactionsLive.PublicTransactions do
145
145
def format_trx_period ( value ) do
146
146
value
147
147
|> round ( )
148
+ |> fix_over_year ( )
148
149
|> Timex . month_name ( )
149
150
end
150
151
152
+ defp fix_over_year ( value ) do
153
+ if value > 12 , do: value - 12 , else: value
154
+ end
155
+
151
156
def build_pointplot ( dataset , chart_options ) do
152
157
module =
153
158
case chart_options . type do
@@ -233,7 +238,7 @@ defmodule FullstackWeb.Public.TransactionsLive.PublicTransactions do
233
238
234
239
data = socket . assigns . info . monthly_data
235
240
236
- series_cols = [ "Count" , "Amount " ]
241
+ series_cols = [ "Count" , "$ *100 " ]
237
242
238
243
test_data =
239
244
case needs_update do
0 commit comments