@@ -860,31 +860,33 @@ The fields which can be used in the template are:
860860#### Example - specify a custom template for the KPI Status measure
861861
862862 <div id="pivotgrid"></div>
863-
863+
864864 <script>
865- $("#pivotgrid").kendoPivotGridV2({
866- kpiStatusTemplate:({ dataItem }) => `${dataItem.value !== 0 ? "<em>Open/Denied</em>" : "<strong>Hold</strong>"}`,
867- dataSource: {
868- type: "xmla",
869- columns: [{ name: "[Date].[Calendar]", expand: true } ],
870- measures: ["[Measures].[Internet Revenue Status]"],
871- transport: {
872- connection: {
873- catalog: "Adventure Works DW 2008R2",
874- cube: "Adventure Works"
865+ $("#pivotgrid").kendoPivotGridV2({
866+ kpiStatusTemplate:({ dataItem }) => `${dataItem.value !== 0 ? "<em>Open/Denied</em>" : "<strong>Hold</strong>"}`,
867+ dataSource: {
868+ type: "xmla",
869+ columns: [{ name: "[Date].[Calendar]", expand: true } ],
870+ rows: [{ name: "[Geography].[City]" }],
871+ measures: [{ name: "[Measures].[Internet Revenue Status]", type: "status"}],
872+ transport: {
873+ connection: {
874+ catalog: "Adventure Works DW 2008R2",
875+ cube: "Adventure Works"
876+ },
877+ read: {
878+ url: "https://demos.telerik.com/olap/msmdpump.dll",
879+ dataType: "text",
880+ contentType: "text/xml",
881+ type: "POST"
882+ }
875883 },
876- read: {
877- url: "https://demos.telerik.com/olap/msmdpump.dll",
878- dataType: "text",
879- contentType: "text/xml",
880- type: "POST"
884+ schema: {
885+ type: "xmla"
881886 }
882- },
883- schema: {
884- type: "xmla"
885887 }
886- }
887- });
888+ });
889+
888890 </script>
889891
890892### kpiTrendTemplate ` String|Function `
@@ -901,31 +903,32 @@ The fields which can be used in the template are:
901903#### Example - specify a custom template for the KPI Trend measure
902904
903905 <div id="pivotgrid"></div>
904-
906+
905907 <script>
906- $("#pivotgrid").kendoPivotGridV2({
907- kpiTrendTemplate: ({ dataItem }) => `${dataItem.value !== 0 ? "<em>Increase/Decrease</em>" : "<strong>Equal</strong>"}`,
908- dataSource: {
909- type: "xmla",
910- columns: [{ name: "[Date].[Calendar]", expand: true } ],
911- measures: ["[Measures].[Internet Revenue Trend]"],
912- transport: {
913- connection: {
914- catalog: "Adventure Works DW 2008R2",
915- cube: "Adventure Works"
908+ $("#pivotgrid").kendoPivotGridV2({
909+ kpiTrendTemplate: ({ dataItem }) => `${dataItem.value !== 0 ? "<em>Increase/Decrease</em>" : "<strong>Equal</strong>"}`,
910+ dataSource: {
911+ type: "xmla",
912+ columns: [{ name: "[Date].[Calendar]", expand: true } ],
913+ rows: [{ name: "[Geography].[City]" }],
914+ measures: [{ name: "[Measures].[Internet Revenue Trend]", type: "trend"}],
915+ transport: {
916+ connection: {
917+ catalog: "Adventure Works DW 2008R2",
918+ cube: "Adventure Works"
919+ },
920+ read: {
921+ url: "https://demos.telerik.com/olap/msmdpump.dll",
922+ dataType: "text",
923+ contentType: "text/xml",
924+ type: "POST"
925+ }
916926 },
917- read: {
918- url: "https://demos.telerik.com/olap/msmdpump.dll",
919- dataType: "text",
920- contentType: "text/xml",
921- type: "POST"
927+ schema: {
928+ type: "xmla"
922929 }
923- },
924- schema: {
925- type: "xmla"
926930 }
927- }
928- });
931+ });
929932 </script>
930933
931934### rowHeaderTemplate ` String|Function `
0 commit comments