Sha256: d9192aadea26b5d8ec7b41fa46801eb894425e1e59a346fd1b4ffbedf3383bb1

Contents?: true

Size: 786 Bytes

Versions: 9

Compression:

Stored size: 786 Bytes

Contents

- cache(self, expires_in: 1.day) do
  - if chart_data.any?
    - use_stimulus = false

    - if use_stimulus
      / This is the stimulusjs version. See sparklines_controller.js
      div(data-controller="pathology-sparklines"
          data-pathology-sparklines-chart-data='[["2010-06-03T16:37:00.000+01:00","106"], ["2011-06-03T16:37:00.000+01:00","110"]]')
        div(data-target="pathology-sparklines.chart")
    - else
      / This implementation uses ChartKick to insert the chart javascript into the
      / page. It works fine, but when there are 50 path results on screen, we are
      / inserting 50 copies of the chart defition and options. Hence a stimulusjs
      / approach might be better.
      = area_chart chart_data, options.merge(height: 15, width: 80, id: dom_id)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
renalware-core-2.0.160 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.159 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.158 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.157 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.156 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.155 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.153 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.152 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.151 app/components/renalware/pathology/sparkline_component.html.slim