1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | |
---|
3 | <xsl:stylesheet version="3.0" |
---|
4 | xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" |
---|
5 | xmlns:xs ="http://www.w3.org/2001/XMLSchema" |
---|
6 | xmlns:ibis="http://www.ibisph.org" |
---|
7 | |
---|
8 | exclude-result-prefixes="ibis xs xsl" |
---|
9 | > |
---|
10 | <xsl:import href="../../../../xml/Interactive.xslt"/> |
---|
11 | <xsl:import href="../../../../json/Dataset.xslt"/> |
---|
12 | <xsl:import href="../../../../json/Kendo.xslt"/> |
---|
13 | <xsl:import href="../../../../json/LeafletMap.xslt"/> |
---|
14 | <xsl:import href="../../../Graphic.xslt"/> |
---|
15 | <xsl:import href="../Indicator.xslt"/> |
---|
16 | <xsl:import href="../Page.xslt"/> |
---|
17 | |
---|
18 | |
---|
19 | <ibis:doc> |
---|
20 | <name>html/indicator/profile/view/Page</name> |
---|
21 | <summary>Interactive indicator profile view page</summary> |
---|
22 | <description> |
---|
23 | Specific XSLT used to create the indicator profile view page. |
---|
24 | </description> |
---|
25 | </ibis:doc> |
---|
26 | |
---|
27 | |
---|
28 | <xsl:param name="Page.pageTitle" ibis:doc="Page's title text based on the 'INDICATOR/TITLE' element."> |
---|
29 | Health Indicator Report - <xsl:value-of select="ibis:getCompleteIndicatorViewTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
30 | </xsl:param> |
---|
31 | <xsl:param name="Page.sectionsTitle" ibis:doc="Page's content block title text based on the 'INDICATOR/TITLE' element."> |
---|
32 | Health Indicator Report of <xsl:value-of select="ibis:getCompleteIndicatorViewTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
33 | </xsl:param> |
---|
34 | |
---|
35 | <xsl:param name="Page.comparisonDimensionName" select="'GeoState'"/> |
---|
36 | <xsl:param name="Page.comparisonDimensionValue" select="'35'"/> |
---|
37 | |
---|
38 | <xsl:param name="Page.showMap" ibis:doc="Exposed so that SS can access." |
---|
39 | select="ibis:Graphic.showMap( |
---|
40 | /INDICATOR_VIEW/MAP_NAME, |
---|
41 | /INDICATOR_VIEW/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='category']/NAME, |
---|
42 | /INDICATOR_VIEW/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='series']/NAME, |
---|
43 | $Indicator.dimensions |
---|
44 | )" |
---|
45 | /> |
---|
46 | <xsl:param name="Page.showChart" select="ibis:Graphic.showChart(/INDICATOR_VIEW/CHART_NAME)"/> |
---|
47 | |
---|
48 | <xsl:param name="Indicator.contentBlockType" select="'fixed'"/> |
---|
49 | <xsl:param name="Indicator.contentBlockTitleLevel" select="3"/> |
---|
50 | |
---|
51 | |
---|
52 | <xsl:template name="Page.sectionsContent" ibis:doc="Main page content template that determines if IP or Surrogate."> |
---|
53 | <xsl:choose> |
---|
54 | <xsl:when test="0 = string-length($indicatorView/SURROGATE_VIEW_URL)"> |
---|
55 | <xsl:call-template name="Page.interativeContent"> |
---|
56 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
57 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
58 | </xsl:call-template> |
---|
59 | </xsl:when> |
---|
60 | <xsl:otherwise> |
---|
61 | <xsl:call-template name="Page.insertAJAXContent"> |
---|
62 | <xsl:with-param name="sourceContentURL" select="$indicatorView/SURROGATE_VIEW_URL"/> |
---|
63 | </xsl:call-template> |
---|
64 | </xsl:otherwise> |
---|
65 | </xsl:choose> |
---|
66 | </xsl:template> |
---|
67 | |
---|
68 | |
---|
69 | <xsl:template name="Page.interativeContent" |
---|
70 | ibis:doc="Main interactive sections content template." |
---|
71 | > |
---|
72 | <xsl:param name="indicator"/> |
---|
73 | <xsl:param name="indicatorView"/> |
---|
74 | <xsl:param name="measure" select="$Indicator.measure"/> |
---|
75 | |
---|
76 | <xsl:variable name="recordDimensionFields"> |
---|
77 | <xsl:call-template name="Interactive.getRecordDimensionFields"> |
---|
78 | <xsl:with-param name="dimensions" select="$Indicator.dimensions"/> |
---|
79 | <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/> |
---|
80 | </xsl:call-template> |
---|
81 | </xsl:variable> |
---|
82 | <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS"/> |
---|
83 | <xsl:variable name="indicatorViewDatasetRecords"> |
---|
84 | <xsl:call-template name="Interactive.getIndicatorViewDatasetRecords"> |
---|
85 | <xsl:with-param name="datasetRecords" select="$datasetRecords"/> |
---|
86 | <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/> |
---|
87 | <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/> |
---|
88 | </xsl:call-template> |
---|
89 | </xsl:variable> |
---|
90 | <xsl:variable name="valueAttributeNames" select="distinct-values($indicatorViewDatasetRecords//VALUE_ATTRIBUTE_NAME)"/> |
---|
91 | |
---|
92 | <xsl:call-template name="ContentContainer.expandable"> |
---|
93 | <xsl:with-param name="title" select="'Why Is This Important?'"/> |
---|
94 | <xsl:with-param name="content" select="$indicator/WHY_IMPORTANT"/> |
---|
95 | <xsl:with-param name="description" select="'Text that describes why this indicator is important to the populations overall health'"/> |
---|
96 | <xsl:with-param name="show" select="true()"/> |
---|
97 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
98 | <xsl:with-param name="addWikiAttribute" select="true()"/> |
---|
99 | </xsl:call-template> |
---|
100 | <!-- GARTH TODO: remove |
---|
101 | <xsl:message select="$indicatorView/MAP_NAME"/> |
---|
102 | <xsl:message select="$indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='category']/NAME"/> |
---|
103 | <xsl:message select="$indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='series']/NAME"/> |
---|
104 | <xsl:message select="$indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='constant']/NAME"/> |
---|
105 | <xsl:message select="$Page.showMap"/> |
---|
106 | --> |
---|
107 | |
---|
108 | <xsl:if test="$Page.showMap"> |
---|
109 | <xsl:call-template name="ContentContainer.expandable"> |
---|
110 | <xsl:with-param name="title" select="'Map'"/> |
---|
111 | <xsl:with-param name="content"> |
---|
112 | <xsl:call-template name="Graphic.mapContainer"> |
---|
113 | <xsl:with-param name="containerID" select="'map'"/> |
---|
114 | <xsl:with-param name="title" select="ibis:getIndicatorViewMapTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
115 | <xsl:with-param name="footerContent" select="$indicatorView/MAP_NARRATIVE"/> |
---|
116 | </xsl:call-template> |
---|
117 | </xsl:with-param> |
---|
118 | <xsl:with-param name="show" select="true()"/> |
---|
119 | <xsl:with-param name="addWikiAttribute" select="false()"/> |
---|
120 | <xsl:with-param name="description" select="'Choropleth/thematic map.'"/> |
---|
121 | </xsl:call-template> |
---|
122 | </xsl:if> |
---|
123 | |
---|
124 | <xsl:if test="$Page.showChart"> |
---|
125 | <xsl:call-template name="ContentContainer.expandable"> |
---|
126 | <xsl:with-param name="title" select="if('Line'=$indicatorView/CHART_NAME) then 'Trend' else 'Chart'"/> |
---|
127 | <xsl:with-param name="content"> |
---|
128 | <xsl:call-template name="Graphic.chartContainer"> |
---|
129 | <xsl:with-param name="containerID" select="'chart'"/> |
---|
130 | <xsl:with-param name="footerContent" select="$indicatorView/CHART_NARRATIVE"/> |
---|
131 | </xsl:call-template> |
---|
132 | </xsl:with-param> |
---|
133 | <xsl:with-param name="inputOnChangeAttribute" select="'resizeKendoChart()'"/> |
---|
134 | <xsl:with-param name="show" select="not($Page.showMap)"/> |
---|
135 | <xsl:with-param name="addWikiAttribute" select="false()"/> |
---|
136 | </xsl:call-template> |
---|
137 | </xsl:if> |
---|
138 | |
---|
139 | <xsl:call-template name="ContentContainer.expandable"> |
---|
140 | <xsl:with-param name="title" select="'Supplemental Graphic'"/> |
---|
141 | <xsl:with-param name="content"> |
---|
142 | <xsl:call-template name="Indicator.supplementalImage"> |
---|
143 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
144 | </xsl:call-template> |
---|
145 | </xsl:with-param> |
---|
146 | <xsl:with-param name="show" select="true()"/> |
---|
147 | <xsl:with-param name="addWikiAttribute" select="false()"/> |
---|
148 | </xsl:call-template> |
---|
149 | |
---|
150 | <xsl:call-template name="ContentContainer.expandable"> |
---|
151 | <xsl:with-param name="title" select="'Data Notes'"/> |
---|
152 | <xsl:with-param name="content"> |
---|
153 | <xsl:call-template name="Indicator.dataNotes"> |
---|
154 | <xsl:with-param name="title" select="''"/> |
---|
155 | <xsl:with-param name="measure" select="$measure"/> |
---|
156 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
157 | </xsl:call-template> |
---|
158 | </xsl:with-param> |
---|
159 | <xsl:with-param name="show" select="true()"/> |
---|
160 | </xsl:call-template> |
---|
161 | |
---|
162 | <xsl:call-template name="ContentContainer.expandable"> |
---|
163 | <xsl:with-param name="title" select="'Data Table'"/> |
---|
164 | <xsl:with-param name="content"> |
---|
165 | <xsl:call-template name="Graphic.gridContainer"> |
---|
166 | <xsl:with-param name="containerID" select="'grid'"/> |
---|
167 | <xsl:with-param name="valueAttributeNames" select="$valueAttributeNames"/> |
---|
168 | <xsl:with-param name="valueAttributes" select="$Indicator.valueAttributes"/> |
---|
169 | </xsl:call-template> |
---|
170 | </xsl:with-param> |
---|
171 | <xsl:with-param name="show" select="false()"/> |
---|
172 | <xsl:with-param name="addWikiAttribute" select="false()"/> |
---|
173 | </xsl:call-template> |
---|
174 | |
---|
175 | <xsl:call-template name="ContentContainer.expandable"> |
---|
176 | <xsl:with-param name="title" select="'Data Definitions & Sources'"/> |
---|
177 | <xsl:with-param name="content"> |
---|
178 | <xsl:call-template name="Indicator.definition"/> |
---|
179 | <xsl:call-template name="Indicator.howCalculated"/> |
---|
180 | <xsl:call-template name="Indicator.dataSources"/> |
---|
181 | </xsl:with-param> |
---|
182 | <xsl:with-param name="show" select="false()"/> |
---|
183 | <xsl:with-param name="description" select="'Metadata for this health indicator.'"/> |
---|
184 | </xsl:call-template> |
---|
185 | |
---|
186 | |
---|
187 | <xsl:call-template name="ContentContainer.expandable"> |
---|
188 | <xsl:with-param name="title" select="'Health Objectives and Targets'"/> |
---|
189 | <xsl:with-param name="content"> |
---|
190 | <xsl:call-template name="Indicator.initiatives"/> |
---|
191 | <xsl:call-template name="Indicator.otherObjectives"/> |
---|
192 | </xsl:with-param> |
---|
193 | <xsl:with-param name="description" select="'Goals and objectives for this health indicator.'"/> |
---|
194 | </xsl:call-template> |
---|
195 | |
---|
196 | <xsl:call-template name="ContentContainer.expandable"> |
---|
197 | <xsl:with-param name="title" select="'Current Outlook'"/> |
---|
198 | <xsl:with-param name="content"> |
---|
199 | <xsl:call-template name="Indicator.howDoing"/> |
---|
200 | <xsl:call-template name="Indicator.howCompare"/> |
---|
201 | </xsl:with-param> |
---|
202 | <xsl:with-param name="description" select="'How are we doing, how do we compare.'"/> |
---|
203 | </xsl:call-template> |
---|
204 | |
---|
205 | <xsl:call-template name="ContentContainer.expandable"> |
---|
206 | <xsl:with-param name="title" select="'Health Improvement Resources'"/> |
---|
207 | <xsl:with-param name="content"> |
---|
208 | <xsl:call-template name="Indicator.whatDoing"/> |
---|
209 | <xsl:call-template name="Indicator.evidenceBasedPractices"/> |
---|
210 | <xsl:call-template name="Indicator.availableServices"/> |
---|
211 | <xsl:call-template name="Indicator.moreResources"/> |
---|
212 | <xsl:call-template name="Indicator.otherInformation"/> |
---|
213 | </xsl:with-param> |
---|
214 | <xsl:with-param name="description" select="'Other related information and resources.'"/> |
---|
215 | </xsl:call-template> |
---|
216 | |
---|
217 | <xsl:call-template name="ContentContainer.expandable"> |
---|
218 | <xsl:with-param name="title" select="'References'"/> |
---|
219 | <xsl:with-param name="content"> |
---|
220 | <xsl:call-template name="Indicator.footnoteReferences"/> |
---|
221 | </xsl:with-param> |
---|
222 | <xsl:with-param name="description" select="'References that may / might not be cited on this page.'"/> |
---|
223 | </xsl:call-template> |
---|
224 | |
---|
225 | <xsl:call-template name="Indicator.allDates"/> |
---|
226 | |
---|
227 | <xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/ANCILLARY_VALUE_USAGES/ANCILLARY_VALUE_USAGE/NAME)"/> |
---|
228 | <xsl:variable name="measureValueFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/> |
---|
229 | <xsl:call-template name="Graphic.choroplethMapJavaScript"/> |
---|
230 | <xsl:call-template name="Graphic.leafletKendoScript"> |
---|
231 | <xsl:with-param name="scriptContainerID" select="concat($indicatorView/NAME, '_script')"/> |
---|
232 | <xsl:with-param name="dimensions" select="$Indicator.dimensions"/> |
---|
233 | <xsl:with-param name="datasetRecords" select="$indicatorViewDatasetRecords"/> |
---|
234 | <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/> |
---|
235 | <xsl:with-param name="recordAncillaryValueFields"> |
---|
236 | <xsl:call-template name="Interactive.getIndicatorRecordAncillaryValueFields"> |
---|
237 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
238 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
239 | <xsl:with-param name="ancillaryValueNames" select="$ancillaryValueNames"/> |
---|
240 | <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/> |
---|
241 | <xsl:with-param name="valueTypes" select="$Indicator.valueTypes"/> |
---|
242 | <xsl:with-param name="measureValueFormatPattern" select="$measureValueFormatPattern"/> |
---|
243 | </xsl:call-template> |
---|
244 | </xsl:with-param> |
---|
245 | |
---|
246 | <xsl:with-param name="measure" select="$measure"/> |
---|
247 | <xsl:with-param name="measureValueFormatPattern" select="$measureValueFormatPattern"/> |
---|
248 | |
---|
249 | <xsl:with-param name="showMap" select="$Page.showMap"/> |
---|
250 | <xsl:with-param name="mapName" select="$indicatorView/MAP_NAME"/> |
---|
251 | <xsl:with-param name="geoJSONName" select="$indicatorView/MAP_DIMENSION_NAME"/> |
---|
252 | <xsl:with-param name="geoIDFieldName" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/> |
---|
253 | <xsl:with-param name="geoIDFieldValuePrefixToRemove" select="concat($indicatorView/MAP_DIMENSION_NAME, '.')"/> |
---|
254 | <xsl:with-param name="geoTypeTitle" select="ibis:getDimensionTitle($indicator//DIMENSIONS/DIMENSION[NAME = $indicatorView/MAP_DIMENSION_NAME])"/> |
---|
255 | <xsl:with-param name="mapComparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName) and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/> |
---|
256 | |
---|
257 | <xsl:with-param name="showChart" select="$Page.showChart"/> |
---|
258 | <xsl:with-param name="chartName" select="$indicatorView/CHART_NAME"/> |
---|
259 | <xsl:with-param name="chartTitle" select="ibis:getIndicatorViewChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
260 | |
---|
261 | <xsl:with-param name="showGrid" select="true()"/> |
---|
262 | <xsl:with-param name="showValueAttributeColumn" select="0 != count($valueAttributeNames)"/> |
---|
263 | <xsl:with-param name="showLabelColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/> |
---|
264 | <!-- never show this... |
---|
265 | <xsl:with-param name="showNoteColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(NOTE)])"/> |
---|
266 | --> |
---|
267 | |
---|
268 | <xsl:with-param name="baseExportFilename" select="ibis:getCompleteIndicatorViewTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
269 | </xsl:call-template> |
---|
270 | </xsl:template> |
---|
271 | |
---|
272 | |
---|
273 | |
---|
274 | |
---|
275 | <!-- |
---|
276 | ========================================================================== |
---|
277 | ========================================================================== |
---|
278 | ========================================================================== |
---|
279 | |
---|
280 | |
---|
281 | // Hack for vert bar charts to fill the width of the container. |
---|
282 | // Kendo charts have an issue filling when the container is hidden. |
---|
283 | // For some reason on my system need to wait 2 seconds for it |
---|
284 | // to work. |
---|
285 | // If set width then it's that size no matter what the window is |
---|
286 | // resized to. Only 100% sure fire way is to have open or fire |
---|
287 | // some script when opened. |
---|
288 | // setTimeout(resizeKendoChart, 1000); |
---|
289 | var chartContainerWidth = $(".ExpandableContent").innerWidth(); |
---|
290 | // $kendoChart.getKendoChart().options.chartArea.width = chartContainerWidth; |
---|
291 | // $("#chart").width = $(".ExpandableContent").innerWidth(); |
---|
292 | $kendoChart.getKendoChart().resize(); |
---|
293 | }); |
---|
294 | |
---|
295 | function resizeKendoChart() |
---|
296 | { |
---|
297 | // var chartContainerWidth = $(".ExpandableContent").innerWidth(); |
---|
298 | // $kendoChart.getKendoChart().options.chartArea.width = chartContainerWidth; |
---|
299 | $kendoChart.getKendoChart().resize(); |
---|
300 | // $kendoChart.resize($("#chart")); |
---|
301 | }; |
---|
302 | |
---|
303 | function myFunction() { |
---|
304 | kendoDataSource.read(); |
---|
305 | $kendoChart.getKendoChart().resize(); |
---|
306 | $kendoChart.getKendoChart().refresh(); |
---|
307 | $kendoChart.getKendoChart().redraw(); |
---|
308 | $kendoGrid.getKendoGrid().dataSource.sort({field: "CategorySortOrder", dir: "asc"}); |
---|
309 | } |
---|
310 | |
---|
311 | /* |
---|
312 | // none of these have any effect on the chart!!! |
---|
313 | // $kendoGrid.getKendoGrid().refresh(); |
---|
314 | // $kendoChart.width(1000); |
---|
315 | // $kendoChart.chartArea.width(1000); |
---|
316 | // $kendoChart.getKendoChart().resize(); |
---|
317 | // $kendoChart.getKendoChart().refresh(); |
---|
318 | // $kendoChart.getKendoChart().redraw(); |
---|
319 | |
---|
320 | $kendoGrid.getKendoGrid().dataSource.sort({field: "CategorySortOrder", dir: "asc"}); |
---|
321 | $kendoGrid.getKendoGrid().refresh(); |
---|
322 | $kendoChart.getKendoChart().redraw(); |
---|
323 | */ |
---|
324 | |
---|
325 | /* GARTH TODO: |
---|
326 | $("#grid tr[role='row']").on("mouseenter mouseover", function () { |
---|
327 | var row = $("#grid").data("kendoGrid").dataItem(this); //get the data item attached to this row being hovered |
---|
328 | chart.toggleHighlight(true, |
---|
329 | function(point) |
---|
330 | { |
---|
331 | return point.dataItem.Id === row.rowID; |
---|
332 | } |
---|
333 | ); //show the tooltip for the point where the Ids match |
---|
334 | |
---|
335 | |
---|
336 | |
---|
337 | |
---|
338 | GARTH TODO: |
---|
339 | |
---|
340 | // var firstSlot = $kendoChart.getKendoChart()._plotArea.axes[0].getSlot(0); |
---|
341 | // alert("first slot width" + firstSlot.width()); |
---|
342 | |
---|
343 | <xsl:variable name="geoDimensionName" select=" |
---|
344 | if(0 != string-length($indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME)) |
---|
345 | then $indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME |
---|
346 | else ($Indicator.dimensions/DIMENSION[ |
---|
347 | exists(GEOGRAPHY_FLAG) |
---|
348 | and |
---|
349 | NAME = $indicatorView//DIMENSION_USAGE/NAME |
---|
350 | ])[1]/NAME" |
---|
351 | /> |
---|
352 | |
---|
353 | <xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/> |
---|
354 | <xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/> |
---|
355 | <xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/> |
---|
356 | <xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]])"/> |
---|
357 | <xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/> |
---|
358 | <xsl:message select="concat('Interactive - Show Map: ', $showMap, ', geoDimensionName:', $geoDimensionName)"/> |
---|
359 | |
---|
360 | <xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX interact.xslt'"/> |
---|
361 | <xsl:message select="$Page.comparisonDimensionName"/> |
---|
362 | <xsl:message select="$Page.comparisonDimensionValue"/> |
---|
363 | <xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName) and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/> |
---|
364 | |
---|
365 | Stuff to try when doing dashboard |
---|
366 | function dataSource_change(e) { |
---|
367 | console.log(e); |
---|
368 | } |
---|
369 | kendoDataSource.bind("change", dataSource_change); |
---|
370 | select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName) and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/> |
---|
371 | |
---|
372 | ********************************************** |
---|
373 | |
---|
374 | PROBLEM: "CATEGORY":"GeoCnty.4" |
---|
375 | <xsl:with-param name="geoJSONName" select="$indicatorView/MAP_DIMENSION_NAME"/> |
---|
376 | |
---|
377 | ****************** |
---|
378 | probably need to geojson to have the geodim name + . + geodim value to uniquely ID the area. |
---|
379 | |
---|
380 | ************ PROBLEM is that the QM only returns 1..31 and not GeoCnty.1 |
---|
381 | |
---|
382 | The IP and QM dimension files are all 1..31 |
---|
383 | |
---|
384 | So, need the field name then use the geotype and parse the .XXX from the end. |
---|
385 | Then in the QM will need to build the JSON fields the same way as we do with |
---|
386 | the IP - which is the right way to do it anyway so fields can be combined??? |
---|
387 | |
---|
388 | *** also have issues with if 2d and 3d... |
---|
389 | if mult series then drop down for that. |
---|
390 | if mult constants then drop down for that as well. |
---|
391 | when changed regen map. |
---|
392 | Need to specify the category field name and value |
---|
393 | Need to specify the series field name and value |
---|
394 | Need to specify the constant field name and value |
---|
395 | |
---|
396 | GeoJSON GeoID Prefix to add when doing comparison??? |
---|
397 | |
---|
398 | <xsl:variable name="communityDatasets" select="$indicator/DATASETS/DATASET[DIMENSION_COMBINATIONS/DIMENSION_COMBINATION[not(DIMENSION_2/NAME) and DIMENSION_1/NAME = $communityDimensionName]]"/> |
---|
399 | <xsl:variable name="communityDataset" select="$communityDatasets[(MEASURE_NAME = $measureName) and DIMENSION_COMBINATIONS/DIMENSION_COMBINATION[PERIOD_DIMENSION/NAME = $periodName]]"/> |
---|
400 | <xsl:variable name="stateRecord" select="$communityDataset/RECORDS/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $stateDimensionName) and (VALUE = $stateDimensionValue)] and DIMENSION[(NAME = $periodName) and (VALUE = $periodValue)]]]"/> |
---|
401 | |
---|
402 | |
---|
403 | GARTH TODO: |
---|
404 | <xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX'"/> |
---|
405 | <xsl:message select="$indicatorViewDatasetRecords[1]"/> |
---|
406 | |
---|
407 | |
---|
408 | |
---|
409 | <xsl:with-param name="dimensionFieldInclusionCriteria"> |
---|
410 | records have the field names to filter. |
---|
411 | to include need field name and value. |
---|
412 | |
---|
413 | specifies the records held constant - This is to filter out not matching constant records |
---|
414 | |
---|
415 | for mouse overs, the title needs specifics - dimension title and dimension value title. |
---|
416 | <DIMENSION><NAME>CONSTANT</NAME><VALUE>YearAll.2014</VALUE><TITLE>Year</TITLE><VALUE_TITLE>2014</VALUE_TITLE></DIMENSION> |
---|
417 | <DIMENSION><NAME>SERIES</NAME><VALUE>Sex.1</VALUE><TITLE>Sex</TITLE><VALUE_TITLE>Male</VALUE_TITLE></DIMENSION> |
---|
418 | </xsl:with-param> |
---|
419 | |
---|
420 | ========================================================================== |
---|
421 | <xsl:message select="$indicatorViewDatasetRecords/RECORD"/> |
---|
422 | |
---|
423 | <xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX interact.xslt'"/> |
---|
424 | <xsl:message select="$indicatorView/MAP_DIMENSION_NAME"/> |
---|
425 | <xsl:message select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/> |
---|
426 | |
---|
427 | ========================================================================== |
---|
428 | ========================================================================== |
---|
429 | ========================================================================== |
---|
430 | --> |
---|
431 | |
---|
432 | </xsl:stylesheet> |
---|
433 | <!-- ============================= End of File ============================= --> |
---|