Class: Shadcn::Chart::Line::Component

Inherits:
Cartesian::Component show all
Defined in:
app/components/shadcn/chart/line/component.rb

Overview

Upstream's "Line Chart", drawn on the server: one polyline per series, with a dot at each reading.

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

Direct Known Subclasses

Area::Component

Constant Summary collapse

DOT =
4
REACH =

The dot a pointer has to hit, which is not the dot a reader sees. Four pixels is a target nobody can hold, so a transparent circle takes the events and the visible one takes the colour.

10

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