fix: a2ui is much closer to bDS parity than before
This commit is contained in:
@@ -738,21 +738,7 @@ defmodule BDS.Desktop.ShellLive.ChatEditor do
|
||||
|
||||
<% "heatmap" -> %>
|
||||
<% heat = BDS.Desktop.ShellLive.ChatEditor.ChartView.heatmap(@surface.series) %>
|
||||
<%= if heat.rows == [] do %>
|
||||
<div class="chat-surface-chart-list">
|
||||
<%= for series <- @surface.series do %>
|
||||
<div class="chat-surface-chart-row">
|
||||
<div class="chat-surface-chart-meta">
|
||||
<span><%= series.label %></span>
|
||||
<span><%= series.value %></span>
|
||||
</div>
|
||||
<div class="chat-surface-chart-bar">
|
||||
<span style={"width: #{chart_width(@surface.max_value, series.value)}%"}></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= if heat.rows != [] do %>
|
||||
<div class="chat-surface-chart-heatmap" style={"grid-template-columns: auto repeat(#{heat.column_count}, 1fr)"}>
|
||||
<span class="chat-surface-chart-heatmap-corner"></span>
|
||||
<%= for col <- heat.columns do %>
|
||||
|
||||
@@ -104,7 +104,7 @@ defmodule BDS.Desktop.ShellLive.ChatEditor.ToolSurfaces do
|
||||
id: surface_id,
|
||||
type: "chart",
|
||||
title: map_value(arguments, "title"),
|
||||
chart_type: map_value(arguments, "chart_type", "bar"),
|
||||
chart_type: map_value(arguments, "chartType") || map_value(arguments, "chart_type", "bar"),
|
||||
series: series,
|
||||
max_value: Enum.max([0 | Enum.map(series, & &1.value)])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user