Sha256: 2d21a70b42972254cf526d9bbb4bd92c52bb081169512aeb0a940f778d154efe
Contents?: true
Size: 894 Bytes
Versions: 28
Compression:
Stored size: 894 Bytes
Contents
# frozen_string_literal: true module Playbook module PbLineGraph class LineGraph include Playbook::Props partial "pb_line_graph/line_graph" prop :axis_title prop :chart_data, type: Playbook::Props::Array, default: [] prop :gradient, type: Playbook::Props::Boolean, default: false prop :point_start, type: Playbook::Props::Numeric prop :subtitle prop :title def chart_type gradient ? "area" : "line" end def chart_options { id: id, chartData: chart_data, type: chart_type, title: title, subTitle: subtitle, axisTitle: axis_title, pointStart: point_start, }.to_json.html_safe end def classname generate_classname("pb_line_graph") end end end end
Version data entries
28 entries across 28 versions & 1 rubygems