132 lines
4.1 KiB
Handlebars
132 lines
4.1 KiB
Handlebars
{{#if chartLoaded }}
|
|
<svg width='100%' height={{SVGHeight}}>
|
|
<g class="health-chart-viewport" transform="translate(0, {{seriePadding}})">
|
|
{{#each-in series as |category charts|}}
|
|
{{#each charts as |chart|}}
|
|
{{#if chart.blank}}
|
|
{{#if (includes category 'conditions' 'symptoms')}}
|
|
{{chart/g-blank-trackable
|
|
model=chart.model
|
|
width=seriesWidth
|
|
height=serieHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{else if (includes category 'treatments' 'tags' 'foods')}}
|
|
{{chart/g-blank-flat
|
|
model=chart.model
|
|
width=seriesWidth
|
|
height=flatHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if (includes category 'conditions' 'symptoms')}}
|
|
{{chart/g-trackable
|
|
endAt=endAt
|
|
model=chart.model
|
|
width=seriesWidth
|
|
height=serieHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
checkins=checkins
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{else if (includes category 'treatments' 'tags' 'foods')}}
|
|
{{chart/g-flat
|
|
endAt=endAt
|
|
model=chart.model
|
|
width=seriesWidth
|
|
height=flatHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
checkins=checkins
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{else if (includes category 'harveyBradshawIndices')}}
|
|
{{chart/g-hbi
|
|
name=chart.name
|
|
field=chart.field
|
|
width=seriesWidth
|
|
height=serieHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
checkins=checkins
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{else if (includes category 'weathersMeasures')}}
|
|
{{chart/g-weather
|
|
name=chart.name
|
|
unit=chart.unit
|
|
field=chart.field
|
|
width=seriesWidth
|
|
height=serieHeight
|
|
padding=seriePadding
|
|
startAt=startAt
|
|
category=category
|
|
checkins=checkins
|
|
timeline=timeline
|
|
chartOffset=chart.chartOffset
|
|
}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/each-in}}
|
|
|
|
{{chart/g-timeline
|
|
endAt=endAt
|
|
width=seriesWidth
|
|
startAt=startAt
|
|
SVGWidth=SVGWidth
|
|
timeline=timeline
|
|
onMouseHover=(action "openInfoWindow")
|
|
onMouseLeave=(action "closeInfoWindow")
|
|
onDateClicked=(action "setCurrentDate")
|
|
timelineLength=timelineLength
|
|
totalSeriesHeight=totalSeriesHeight
|
|
}}
|
|
</g>
|
|
|
|
{{#if openInfoWindow }}
|
|
<line x1="{{xPosition}}" y1="0" x2="{{xPosition}}" y2="{{totalSeriesHeight}}" class="vertical-line" />
|
|
{{/if}}
|
|
</svg>
|
|
|
|
<div class="chart-enabler">
|
|
{{#power-select
|
|
disabled=isChartEnablerDisabled
|
|
options=hiddenCharts
|
|
placeholder=chartEnablerPlaceholder
|
|
onchange=(action (mut chartToShow))
|
|
searchField="label"
|
|
renderInPlace=true
|
|
searchEnabled=true
|
|
class="fs-private"
|
|
as |chart| }}
|
|
{{chart.label}}
|
|
{{/power-select}}
|
|
</div>
|
|
|
|
{{chart-navigation
|
|
date=centeredDate
|
|
endAt=endAt
|
|
startAt=startAt
|
|
onNavigate=(action 'navigate')
|
|
}}
|
|
{{else}}
|
|
{{partial "application/three-bounce-spinner"}}
|
|
{{/if}}
|