Skip to content

Commit c4d3544

Browse files
committed
Round share graph values to 14
1 parent 8097958 commit c4d3544

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/transformer/caster/template.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ def add_graph_value(graph_method, value)
99
key = graph_method.export_key.to_s
1010
export_method = graph_method.export_method
1111

12+
# Round all numeric values to 14 decimals for consistency
13+
if value.is_a?(Numeric)
14+
value = value.round(14)
15+
end
16+
1217
@template.fetch(:graph_values)[key] ||= {}
1318
@template.fetch(:graph_values).fetch(key).store(export_method, value)
1419
end

0 commit comments

Comments
 (0)