Class: Shadcn::Chart::Area::Component

Inherits:
Line::Component show all
Defined in:
app/components/shadcn/chart/area/component.rb

Overview

Upstream's "Area Chart": the line chart with the space beneath each series filled in.

chart.with_area(data: { "January" => { desktop: 186, mobile: 80 } })

Constant Summary collapse

OPACITY =

Flat, and see-through enough that two overlapping series both stay readable. Upstream's docs example fills from a <linearGradient> instead: that needs a <defs> with an id per series, and an id that has to stay unique in a page this gem cannot see is a cost the fill does not repay.

0.4

Constants inherited from Line::Component

Line::Component::DOT, Line::Component::REACH

Constants inherited from ApplicationViewComponent

ApplicationViewComponent::CONTENTS_STYLE, ApplicationViewComponent::VOID_TAGS

Instance Attribute Summary

Attributes inherited from Cartesian::Component

#config, #label

Attributes inherited from ApplicationViewComponent

#attributes

Method Summary

Methods inherited from Cartesian::Component

#call, #element_attributes, #initialize

Methods inherited from ApplicationViewComponent

#call, #css_classes, default_tag, #element_attributes, #initialize, #merged_style, #render_element, #shadcn_t, slot_name, #style_variants, #tag_name

Constructor Details

This class inherits a constructor from Shadcn::Chart::Cartesian::Component