3.5.0






Legend

Default

Doors
Roofing
Siding
Solar
Gutters
Insulation
Other

Close
<% labels = %W[Windows Doors Roofing Siding Solar Gutters Insulation Other] %>

<% (1..7).each do |n, i| %>
   <%= pb_rails("legend", props: { color: "data_#{n}", text: "#{labels[n]}" }) %> 
<% end %>
With Prefix Text

10 Windows

Close
<%= pb_rails("legend", props: { color: "data_3", prefix_text: "10", text: "Windows" }) %>
Dark Mode

Doors
Roofing
Siding
Solar
Gutters
Insulation
Other

Close
<% labels = %W[Windows Doors Roofing Siding Solar Gutters Insulation Other] %>

<% (1..7).each do |n| %>
   <%= pb_rails("legend", props: { color: "data_#{n}", dark: true, text: "#{labels[n]}" }) %> 
<% end %>
Dark Mode with Prefix Text

10 Windows

Close
<%= pb_rails("legend", props: { dark: true, color: "data_3", prefix_text: "10", text: "Windows" }) %>
Available Props
id
data
classname
aria
children
color
dark
prefix_text
text