source: main/trunk/ibisph-view/src/main/webapp/xslt/html/Kendo.xslt @ 13530

Last change on this file since 13530 was 13530, checked in by Garth Braithwaite, 3 years ago

db, java, xslt - cleaned up the dims to iv sql. Based inserts on actual IVV records because had duplicates. Also based on active records which does not quite line up with production NM data but it appears to check out.

File size: 22.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet version="2.0" 
4        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" 
5        xmlns:ibis="http://www.ibisph.org"
6
7        exclude-result-prefixes="ibis"
8>
9
10        <ibis:doc>
11                <name>html/Kendo</name>
12                <summary>Core Kendo grid, charts, datasource templates</summary>
13                <description>
14                </description>
15
16                <author>Garth Braithwaite</author>
17                <company>Software Technology Group/CDC/Utah Department of Health</company>
18        </ibis:doc>
19
20
21        <xsl:param name="ChartName"
22                ibis:doc="Specifies the type of chart to be displayed.  This value is set
23                        via the Java servlet transformation controller with the value coming
24                        either directly from the page request URL or from an HTTP request parameter. 
25                "
26        />
27        <xsl:param name="Kendo.chartName" ibis:doc="Default value.">
28                <xsl:choose>
29                        <xsl:when test="string-length($ChartName) != 0">
30                                <xsl:value-of select="$ChartName"/>
31                        </xsl:when>
32                        <xsl:when test="string-length(/INDICATOR_VIEW/CHART_NAME) != 0">
33                                <xsl:value-of select="/INDICATOR_VIEW/CHART_NAME"/>
34                        </xsl:when>
35                        <xsl:when test="string-length(/QUERY_MODULE/REQUEST/CHART_NAME) != 0">
36                                <xsl:value-of select="/QUERY_MODULE/REQUEST/CHART_NAME"/>
37                        </xsl:when>
38                        <xsl:otherwise>DEFAULT</xsl:otherwise> 
39                </xsl:choose>
40        </xsl:param>
41        <xsl:param name="Kendo.noChartName" select="'None'" ibis:doc="No Chart chart name."/>
42        <xsl:param name="Kendo.showChart" select="$Kendo.noChartName != $Kendo.chartName"/>
43
44        <xsl:param name="Kendo.chartsXMLFilePathAndName" select="'../../WEB-INF/config/kendo_charts.xml'"
45                ibis:doc="CHARTS document path - typically injected via spring."
46        />
47        <xsl:param name="Kendo.charts" select="document($Kendo.chartsXMLFilePathAndName)/CHARTS"
48                ibis:doc="Convenience variable which holds the CHARTS elements - could be injected."
49        />
50
51
52        <xsl:param name="GridName"
53                ibis:doc="Specifies the type of chart to be displayed.  This value is set
54                        via the Java servlet transformation controller with the value coming
55                        either directly from the page request URL or from an HTTP request parameter. 
56                "
57        />
58        <xsl:param name="Kendo.gridName" ibis:doc="Default value.">
59                <xsl:choose>
60                        <xsl:when test="string-length($GridName) != 0">
61                                <xsl:value-of select="$GridName"/>
62                        </xsl:when>
63                        <xsl:when test="string-length(/INDICATOR_VIEW/GRID_NAME) != 0">
64                                <xsl:value-of select="/INDICATOR_VIEW/GRID_NAME"/>
65                        </xsl:when>
66                        <xsl:when test="string-length(/QUERY_MODULE/REQUEST/GRID_NAME) != 0">
67                                <xsl:value-of select="/QUERY_MODULE/REQUEST/GRID_NAME"/>
68                        </xsl:when>
69                        <xsl:otherwise>DEFAULT</xsl:otherwise> 
70                </xsl:choose>
71        </xsl:param>
72
73        <xsl:param name="Kendo.gridsXMLFilePathAndName" select="'../../WEB-INF/config/kendo_grids.xml'"
74                ibis:doc="grids document path - typically injected via spring."
75        />
76        <xsl:param name="Kendo.grids" select="document($Kendo.gridsXMLFilePathAndName)/GRIDS"
77                ibis:doc="Convenience variable which holds the grids elements - could be injected."
78        />
79
80        <xsl:param name="Kendo.gridFooterRowTitle" select="'Overall'"/>
81        <xsl:param name="Kendo.missingValueReplacementValue" select="'null'"/>
82        <!-- the .## makes decimal places optional - if none then no dec - if up to 2 then you get 1 or 2. --> 
83        <xsl:param name="Kendo.defaultMeasureFormatPattern" select="',##0.##'"/>
84
85
86
87        <xsl:template name="Kendo.chartContainer" ibis:doc="Kendo chart container HTML code.">
88                <xsl:param name="containerID" select="'chart'" ibis:doc="Value that is used as an ID for chart.  Default = 'chart'."/>
89                <xsl:param name="title"/>
90                <xsl:param name="defaultContent"/>
91
92                <div class="Graphic Chart">
93                        <xsl:if test="string-length($title) != 0"><h3><xsl:value-of select="$title"/></h3></xsl:if>
94                        <div id="{$containerID}"><xsl:copy-of select="$defaultContent"/></div>
95                </div>
96        </xsl:template>
97
98
99
100        <xsl:template name="Kendo.dataSourceConstructorJSON"
101                ibis:doc="
102                        Template that produces a Kendo Datasource javascript JSON structure.
103                        The datasource consists of defining the data array's 'fields' along
104                        with specifying the fields to be used for grouping and sorting.  This
105                        XSLT code uses dimension and measure NAME type elements as the basis
106                        to generate the associated field names which include actual dimension
107                        name/value, title, sort order values, and in the case of the measures
108                        numeric value, formatted value, LCL, UCL, numer, denom, label, and
109                        note fields.
110
111                        Server side stuff needs to be turned off (which is the default).
112                        ,serverSorting:   false
113                        ,serverPaging:    false
114                        ,serverFiltering: false
115                        If set then client settings are not used e.g. filtering MUST be false
116                        otherwise the client filtering has no effect.  Can't sort the grid etc.
117
118                        SOME GUYS NOTES:
119                        You can't do the .Sum() or .Select() parts. You need to create a model (class) that does this for you so that
120                        you simply return model.PaymentsSum which has either already been calculated or is calculated in this property
121                        of the model. Don't be discouraged this is the first problem everyone has. Esentially for all the Kendo controls
122                        you need to pass them flat models (except for TreeView). When these flat models are constructed though you have
123                        access to the full object graph of the database object you are referencing. It ends up this is the way you want
124                        to do most all of MVC so you can use DataAnnotations and put your heavy lifting in the models. I hope I have
125                        helped, Kendo has some quirks but I have been very happy with it on some really large high profile projects             
126                "
127        >
128                <xsl:param name="javascriptRecordArrayVariableName" select="'records'"/>
129
130                <xsl:param name="recordArrayDimensionFieldNames"         
131                        ibis:doc="Kendo data records JSON dimension field names used.  The
132                                NAME type elements can be either actual IBIS dimension NAMEs or
133                                a generic SERIES, CATEGORY, CONSTANT.  It does not matter to the
134                                Kendo code - it just needs to match the actual data array that is
135                                built by the XSLT and passed into the Kendo script.  Note that
136                                the field name is the base name.  The array should include the
137                                xxx'Title', xxx'SortOrder' fields that were built when creating
138                                the array.  For v3.0+ IP data arry these names are generic to
139                                handle multiple dimensions for a given series or category.  Query
140                                and IP v2.3 the names were the actual IBIS dimension name to make
141                                connecting the dots 100%. 
142                        "
143                >
144                        <NAME>SERIES</NAME>
145                        <NAME>CATEGORY</NAME>
146                </xsl:param>
147                <xsl:param name="recordArrayMeasureFieldNames" 
148                        ibis:doc="Analogous to the dimension names - but represent the data
149                                array's measure field(s)."
150                />
151                <xsl:param name="kendoDatasourceGroupByFieldNames" select="'SERIESSortOrder'"
152                        ibis:doc="Actual, complete group by Kendo datasource record field
153                                name to be used for data groupings/group bys.  The actual group
154                                by field name(s) must be comlete e.g. xxx'Title' or xxx'SortOrder'. 
155                                This param typically only has the one SERIES dimension but is
156                                plural to handle three dimension instances.
157
158                                Note that the dimension's 'Title' field can used and not the actual
159                                value.  Reason for this is because the chart shows the grouped
160                                value used in the legend.
161
162                                Version 3+ went back to using standard series/category/constant
163                                datasource field names.  This was NOT needed for the charts
164                                (groups by actual title) but is was needed for the grid because
165                                we will have multiple dimensions used in the same column.  However,
166                                need a mix of generic/standard names along with specific measure
167                                names.  This allows measure fields to be used for grouping - e.g.
168                                could have a ranking measure and create the series based on that
169                                column. 
170
171                                However, in practice user can't do run time grid header group by
172                                drag and drop so group bys are simply dim names with this code
173                                providing the 'Title' suffix to create the actual field name to
174                                group by.
175                        "
176                />
177                <xsl:param name="kendoDatasourceSortOrderFieldNames" 
178                        ibis:doc="Optional, complete/actual Kendo datasource field name(s) to
179                                sort by.  Can be a xxxSortOrder field or a dimension group by etc. 
180                                This is used by/defines the grid's/chart's default sorting.  If
181                                the 3 way Kendo sorting is enabled then the user can sort asc/dsc
182                                on any column with the 3rd click cycling the grid's column sorting
183                                to the initial order e.g. reverting to the default sorting field. 
184                                Like the grouping field name(s) this value must be complete/specific.
185                        "
186                />
187
188<xsl:text>{</xsl:text>
189        data:  <xsl:value-of select="$javascriptRecordArrayVariableName"/>
190        ,schema:
191        {
192                model:
193                {
194                        id: "rowID"
195                        ,fields:
196                        {
197                                rowID:         { type: "number", editable: false }
198                <xsl:for-each select="$recordArrayDimensionFieldNames[string-length(.) != 0]">
199                                ,"<xsl:value-of select="."/>":          { type: "string" }
200                                ,"<xsl:value-of select="."/>Title":     { type: "string" }
201                                ,"<xsl:value-of select="."/>SortOrder": { type: "number" }
202                </xsl:for-each>
203                <xsl:for-each select="$recordArrayMeasureFieldNames[string-length(.) != 0]">
204                                ,"<xsl:value-of select="."/>":           { type: "number" },  "<xsl:value-of select="."/>Title":           { type: "string" }
205                                ,"<xsl:value-of select="."/>LowerLimit": { type: "number" },  "<xsl:value-of select="."/>LowerLimitTitle": { type: "string" }
206                                ,"<xsl:value-of select="."/>UpperLimit": { type: "number" },  "<xsl:value-of select="."/>UpperLimitTitle": { type: "string" }
207                                ,"<xsl:value-of select="."/>Numerator":  { type: "number" },  "<xsl:value-of select="."/>NumeratorTitle":  { type: "string" }
208                                ,"<xsl:value-of select="."/>Denominator":{ type: "number" },  "<xsl:value-of select="."/>DenominatorTitle":{ type: "string" }
209                                ,"<xsl:value-of select="."/>Label":      { type: "string" },  "<xsl:value-of select="."/>Note":            { type: "string" }
210                </xsl:for-each>
211                        }
212                }           
213        }
214        <xsl:if test="count($kendoDatasourceGroupByFieldNames[string-length(.) != 0]) != 0">
215        ,group:
216        [
217                <xsl:for-each select="$kendoDatasourceGroupByFieldNames[string-length(.) != 0]">
218                        <xsl:if test="position() != 1">,</xsl:if>{field: "<xsl:value-of select="."/>"}
219                </xsl:for-each>
220        ]
221        </xsl:if>
222        ,sort:
223        [
224                <xsl:for-each select="$kendoDatasourceSortOrderFieldNames[string-length(.) != 0]">
225                        <xsl:if test="position() != 1">,</xsl:if>{field: "<xsl:value-of select="."/>", dir: "asc"}
226                </xsl:for-each>
227        ]
228<xsl:text>}</xsl:text>
229        </xsl:template>
230
231
232
233
234        <xsl:template name="Kendo.gridsJavaScript" ibis:doc="Returns the root/general grid javascript from the config file.">
235                <xsl:copy-of select="$Kendo.grids/JAVASCRIPT/node()"/>
236        </xsl:template>
237        <xsl:template name="Kendo.namedGridJavaScript" ibis:doc="Returns the specific grid javascript from the config file.">
238                <xsl:param name="gridName" select="$Kendo.gridName"/>
239                <xsl:copy-of select="$Kendo.grids/GRID[NAME=$gridName]/JAVASCRIPT/node()"/>
240        </xsl:template>
241
242        <xsl:template name="Kendo.gridsJSON" ibis:doc="Returns the base/core grid JSON options from the XML config file.">
243                <xsl:copy-of select="$Kendo.grids/JSON_OPTIONS/node()"/>
244        </xsl:template>
245        <xsl:template name="Kendo.namedGridJSON" ibis:doc="Returns the named grid specific JSON options from the XML config file.">
246                <xsl:param name="gridConfigurationName" select="'DEFAULT'"/>
247                <xsl:if test="not($Kendo.grids/GRID[NAME=$gridConfigurationName]/JSON_OPTIONS)">{}</xsl:if>
248                <xsl:copy-of select="$Kendo.grids/GRID[NAME=$gridConfigurationName]/JSON_OPTIONS/node()"/>
249        </xsl:template>
250
251
252
253
254
255
256
257
258
259
260
261        <xsl:template name="Kendo.requestGridJSON" 
262                ibis:doc="Builds the request specific Grid JSON options.  This is mainly
263                        used to set the column title, header/footer/value templates, sort
264                        comparison func. and any css attributes for formatting.
265
266                        NOTES: Field names are datasource field names.  In some instances
267                        field like v3 IPVs dimension names are series and category.  For QMs
268                        names are actual dimension names.  For measures they are the actual
269                        measure name.
270
271                        See SVN 7526, 2/2/2015 for template and formatting test code.
272                "
273        >
274                <xsl:param name="javascriptDataSourceVariableName" select="'sharedDataSource'"/>
275                <xsl:param name="recordArrayDimensions" 
276                        ibis:doc="Data record's Kendo data source DIMENSIONS/DIMENSIONs"
277                />
278<xsl:param name="measures"              ibis:doc="actual measures."/>
279<xsl:param name="gridMeasures"  ibis:doc="grid's measure column struct - titles."/>
280                <xsl:param name="sortOrderFieldName"/>
281                <xsl:param name="showFooterRow" select="count($gridMeasures/GRID_MEASURE/COLUMNS/COLUMN[string-length(TOTAL_VALUE) != 0]) != 0"/>
282
283                <xsl:param name="seriesDimension" select="$recordArrayDimensions/DIMENSION[USAGE='series']"/>
284
285<!--
286<xsl:message select="$recordArrayDimensions/DIMENSION"/>
287<xsl:message select="$recordArrayDimensions/DIMENSION[not(USAGE = 'series')]"/>
288<xsl:message select="$recordArrayDimensions"/>
289<xsl:message select="'measures'"/>
290<xsl:message select="$measures"/>
291<xsl:message select="'grid measures'"/>
292<xsl:message select="$gridMeasures"/>
293-->
294
295<xsl:text>{</xsl:text>
296    dataSource: <xsl:value-of select="$javascriptDataSourceVariableName"/>
297        ,columns:
298        [
299<xsl:if test="boolean($seriesDimension/NAME)">
300{
301        field: "<xsl:value-of select="$seriesDimension/NAME"/>SortOrder"
302        ,title: "<xsl:value-of select="$seriesDimension/TITLE"/> Series Value" 
303        ,groupHeaderTemplate: "#=getGridDataSourceViewItems(value)[0].<xsl:value-of select="$seriesDimension/NAME"/>Title#"
304        ,hidden: true
305}
306,{
307        field: "<xsl:value-of select="$seriesDimension/NAME"/>Title"
308        ,title: "<xsl:value-of select="$seriesDimension/TITLE"/>"       
309        ,attributes: {"class": "SeriesColumn Dimension"}               
310        ,sortable: false
311        <xsl:if test="$showFooterRow = true()">
312        ,footerTemplate: "<div><xsl:value-of select="$Kendo.gridFooterRowTitle"/></div>"
313        </xsl:if>
314}
315,
316                </xsl:if>
317                <xsl:for-each select="$recordArrayDimensions/DIMENSION[not(USAGE = 'series')]">
318                        <xsl:if test="position() != 1">,</xsl:if>
319                {
320                        field: "<xsl:value-of select="NAME"/>Title"
321                        ,title: "<xsl:value-of select="TITLE"/>"       
322                        ,attributes: {"class": "Dimension"}             
323                        <xsl:if test="($showFooterRow = true()) and not($seriesDimension/NAME)">
324                        ,footerTemplate: "<div><xsl:value-of select="$Kendo.gridFooterRowTitle"/></div>"
325                        </xsl:if>
326                }
327                </xsl:for-each>
328
329<xsl:for-each select="$measures">
330                        <xsl:variable name="measure" select="."/>
331                        <xsl:for-each select="$gridMeasures/GRID_MEASURE[MEASURE_NAME = $measure/NAME]/COLUMNS/COLUMN[not(INFO_FIELD_FLAG)]">
332                ,{
333                        field: "<xsl:value-of select="current()/KENDO_DATASOURCE_FIELD_NAME"/>Title"
334                        ,title: "<xsl:value-of select="current()/TITLE"/>" <xsl:choose>
335                        <!-- if measure has an xslt format pattern then title field is formatted
336                                via xslt format pattern and simply ref the field.  Else use the
337                                default format pattern.
338                        -->
339                                <xsl:when test="string-length(XSLT_FORMAT_PATTERN) != 0">
340                        ,template: "#=<xsl:value-of select="current()/KENDO_DATASOURCE_FIELD_NAME"/>Title#"</xsl:when>
341                                <xsl:otherwise>
342                        ,format: "{0:<xsl:value-of select="$Kendo.defaultMeasureFormatPattern"/>}"</xsl:otherwise>
343                                </xsl:choose>
344                        ,attributes: {"class": "Value"}
345                                <xsl:if test="string-length(TOTAL_VALUE) != 0">
346                        ,footerTemplate:"<xsl:value-of select="TOTAL_VALUE"/>" </xsl:if>
347                        ,sortable:
348                        {
349                                compare: function (a, b)
350                                {
351                                        var diff = a.<xsl:value-of select="current()/KENDO_DATASOURCE_FIELD_NAME"/> - b.<xsl:value-of select="current()/KENDO_DATASOURCE_FIELD_NAME"/>;
352                                        return(diff);
353//                                      return( (0 == diff) ? 0 : (diff > 0) ? 1 : -1);
354                                }
355                        }
356                }
357                        </xsl:for-each>
358                        <xsl:for-each select="$gridMeasures/GRID_MEASURE[MEASURE_NAME = $measure/NAME]/COLUMNS/COLUMN[INFO_FIELD_FLAG]">
359                ,{
360                        field: "<xsl:value-of select="current()/KENDO_DATASOURCE_FIELD_NAME"/>"
361                        ,title: "<xsl:value-of select="current()/TITLE"/>"
362                        ,attributes: {"class": "Notes"}
363                }
364                        </xsl:for-each>
365                </xsl:for-each>
366
367                <xsl:if test="string-length($sortOrderFieldName) != 0">
368                        ,{field: "<xsl:value-of select="$sortOrderFieldName[1]"/>", title: "Default Order", hidden: false, groupable: false}
369                </xsl:if>
370        ]
371<xsl:text>}</xsl:text>
372        </xsl:template>
373
374
375
376
377        <xsl:template name="Kendo.chartsJavaScript" ibis:doc="Returns the root/general chart javascript from the config file.">
378                <xsl:copy-of select="$Kendo.charts/JAVASCRIPT/node()"/>
379        </xsl:template>
380        <xsl:template name="Kendo.namedChartJavaScript" ibis:doc="Returns the specific chart javascript from the config file.">
381                <xsl:param name="chartName" select="$Kendo.chartName"/>
382                <xsl:copy-of select="$Kendo.charts/CHART[NAME=$chartName]/JAVASCRIPT/node()"/>
383        </xsl:template>
384
385
386        <xsl:template name="Kendo.chartsJSON" ibis:doc="Returns the base/core chart JSON options from the XML config file.">
387                <xsl:copy-of select="$Kendo.charts/JSON_OPTIONS/node()"/>
388        </xsl:template>
389        <xsl:template name="Kendo.namedChartJSON" ibis:doc="Returns the named chart specific JSON options from the XML config file.">
390                <xsl:param name="chartName" select="'DEFAULT'"/>
391                <xsl:if test="not($Kendo.charts/CHART[NAME=$chartName]/JSON_OPTIONS)">{}</xsl:if>
392                <xsl:copy-of select="$Kendo.charts/CHART[NAME=$chartName]/JSON_OPTIONS/node()"/>
393        </xsl:template>
394        <xsl:template name="Kendo.requestChartJSON" ibis:doc="Builds the request specific chart JSON options.">
395                <xsl:param name="javascriptDataSourceVariableName" select="'sharedDataSource'"/>
396                <xsl:param name="seriesName"/>
397                <xsl:param name="categoryName"/>
398                <xsl:param name="measure"/>
399                <xsl:param name="measureName" select="$measure/NAME"/>
400
401                <xsl:param name="title" select="'Chart'"/>
402                <xsl:param name="categoryTitle"/>
403                <xsl:param name="seriesTitle"/>
404                <xsl:param name="valueTitle"/>
405
406                <xsl:param name="includeDatasetSeries" select="($seriesName != 'None') and (string-length($seriesName) != 0)"/>
407                <xsl:param name="includeLimits"        select="false()"/>
408                <xsl:param name="includeNumerator"     select="false()"/>
409                <xsl:param name="includeDenominator"   select="false()"/>
410
411                <!--
412                        Did have code to dynamically craft - too complex and error prone.
413                        <xsl:when test="boolean($measure/XSLT_FORMAT_PATTERN)">#=kendo.toString(value, '<xsl:value-of select="$measure/XSLT_FORMAT_PATTERN"/>')#</xsl:when>
414                -->
415                <xsl:param name="valueAxisTemplate">
416                        <xsl:choose>
417                                <xsl:when test="contains($measure/XSLT_FORMAT_PATTERN, '%')">#=kendo.toString(value, '0.0')#%</xsl:when>
418                                <xsl:when test="contains($measureName, 'Percent')"          >#=kendo.toString(value, '0.0')#%</xsl:when>
419                                <xsl:when test="contains($measureName, 'Count')"            >#=kendo.toString(value, ',0')#</xsl:when>
420                                <xsl:otherwise                                              >#=kendo.toString(value, ',0.0')#</xsl:otherwise>
421                        </xsl:choose>
422                </xsl:param>
423
424<xsl:text>{</xsl:text>
425    dataSource: <xsl:value-of select="$javascriptDataSourceVariableName"/>
426        ,title:
427        {
428                text: "<xsl:value-of select="$title"/>"
429        }
430        <!-- Kendo seems to handle automatically e.g. pie shows it multi series charts
431        show it and single series charts do not.
432        ,legend: { visible: <xsl:value-of select="$includeDatasetSeries"/> }
433        -->
434
435        <!-- Use series.categoryField instead of categoryAxis.field. This merges
436                categories from all series data.  Also, should NOT use field: "YearAllTitle
437                this field will override seriesDefaults.field: "value" and will bind the
438                chart to category strings which is not correct - from kendo.
439        -->
440        ,seriesDefaults:
441        {
442                field:           "<xsl:value-of select="$measureName"/>"
443                ,errorLowField:  "<xsl:value-of select="$measureName"/>LowerLimit"
444                ,errorHighField: "<xsl:value-of select="$measureName"/>UpperLimit"
445        }
446        ,series:
447        [
448                {
449                        <!-- kendo said can't set field: - can only set the  categoryField: -->
450                        categoryField: "<xsl:value-of select="$categoryName"/>Title"
451
452                        <!-- group by sort order but title via series name - kendo ticket 946525 -->
453                <xsl:if test="$includeDatasetSeries">
454                        ,name: "#:group.items[0].<xsl:value-of select="$seriesName"/>Title#"
455                </xsl:if>
456                }
457        ]
458
459    ,categoryAxis:
460        [
461                {
462                        name: "defaultCategoryAxis"     // used to test if sorting on category column - special missing values sorting. 
463                        , title:
464                        {
465                                text: "<xsl:value-of select="$categoryTitle"/>"
466                        }
467                }
468        ]
469        ,valueAxis:
470        [
471                {
472                        title:
473                        {
474                                text: "<xsl:value-of select="$valueTitle"/>"
475                        }
476                        ,labels:
477                        {
478                                <!--
479                                //format: "XXX {0:n00}" //Custom Formatter like '00##' "<xsl:value-of select="$valueTitle"/>"
480                                // template: kendo.template("Year: #: value #") //Custom Formatter like '00##' "<xsl:value-of select="$valueTitle"/>"
481                                //template: "Garth: #=value# End"
482                                //,format: "p"
483                                //template: "GGG {kendo.toString(value, '#')}"
484                                // works: template: '#= kendo.toString(value, "n0") #'
485                                // # doesn't appear to work.
486                                // works: template: '#= kendo.toString(value, ",0.0")#%'
487                                // doesn't error but doesn't do anything either: format: 'C'
488                                // <XSLT_FORMAT_PATTERN>#0.00</XSLT_FORMAT_PATTERN>
489                                // this works but again any "#" breaks it.    template: '${kendo.toString(value,",0")}'
490                                // % inside mults by 100 and adds the %:      template: '${kendo.toString(value,",0%")}'
491                                http://docs.telerik.com/kendo-ui/framework/globalization/numberformatting       
492                                        Kendo docs say that # works but it blows things up no matter
493                                        how quoted.  The format config doesn't do anything.
494                                -->
495                                template: "<xsl:value-of select="$valueAxisTemplate"/>"
496                        }
497                }
498        ]
499        ,tooltip:
500        {
501                template: ""
502                <xsl:if test="$includeDatasetSeries">
503                        + "${dataItem.<xsl:value-of select="$seriesName"/>Title}, "
504                </xsl:if>
505                        + "${dataItem.<xsl:value-of select="$categoryName"/>Title}: "
506                        + "${dataItem.<xsl:value-of select="$measureName"/>Title}"
507                <xsl:if test="$includeLimits">
508                        + "<br/>95% CI - Lower: ${dataItem.<xsl:value-of select="$measureName"/>LowerLimitTitle}, Upper: ${dataItem.<xsl:value-of select="$measureName"/>UpperLimitTitle}"
509                </xsl:if>
510                <xsl:if test="$includeNumerator">
511                        + "<br/>Numerator: ${dataItem.<xsl:value-of select="$measureName"/>NumeratorTitle}"
512                </xsl:if>
513                <xsl:if test="$includeDenominator">
514                        + ", Denominator: ${dataItem.<xsl:value-of select="$measureName"/>DenominatorTitle}"
515                </xsl:if>
516        }
517<xsl:text>}</xsl:text>
518        </xsl:template>
519
520</xsl:stylesheet>
521<!-- ============================= End of File ============================= -->
Note: See TracBrowser for help on using the repository browser.