Sha256: 09fcdddd418a3d476ea1cc452cc1b42c2ddb8c1315c75fc682ba5232bd96fe98

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-pathology-sparklines-target="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.1.1 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.1.0 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.167 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.166 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.165 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.164 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.163 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.162 app/components/renalware/pathology/sparkline_component.html.slim
renalware-core-2.0.161 app/components/renalware/pathology/sparkline_component.html.slim