Commit 28ff9324 authored by CORP\prumde's avatar CORP\prumde

Changes done for SUN CHC Dashboard

parent 24f9e315
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</filters> </filters>
<page_title><![CDATA[CHC SUN Activity]]></page_title> <page_title><![CDATA[CHC SUN Activity]]></page_title>
<datasource id="1" dataSourceType="datamodel"><![CDATA[CHC_KPI_DM]]></datasource> <datasource id="1" dataSourceType="datamodel"><![CDATA[CHC_KPI_DM]]></datasource>
<view id="1" name="Default" type="flatonly"> <view id="1" name="Default" type="flatonly" fixed_refresh="true">
<component datasource="1" id="1" type="COMPOSITE"> <component datasource="1" id="1" type="COMPOSITE">
<component_icon><![CDATA[]]></component_icon> <component_icon><![CDATA[]]></component_icon>
<ComponentTitle><![CDATA[]]></ComponentTitle> <ComponentTitle><![CDATA[]]></ComponentTitle>
...@@ -444,10 +444,8 @@ ...@@ -444,10 +444,8 @@
] ]
} }
} }
} }
]]></composite_config> ]]></composite_config>
</composite> </composite>
<composite> <composite>
...@@ -473,23 +471,22 @@ ...@@ -473,23 +471,22 @@
</column_group> </column_group>
<composite_config><![CDATA[ <composite_config><![CDATA[
{ {
chartDetailModel:{ chartDetailModel:{
series : true, series : true,
summary : { summary : {
info_column : 'ACTUAL_VALUE_STR', info_column : 'ACTUAL_VALUE_STR',
subinfo_column : 'TARGET_VALUE_STR', subinfo_column : 'TARGET_VALUE_STR',
data_column : 'ACTUAL_VALUE', data_column : 'ACTUAL_VALUE',
target_column : 'TARGET_VALUE', target_column : 'TARGET_VALUE',
sh_descr : 'SH_DESCR' sh_descr : 'SH_DESCR'
} }
}, },
chartConfig: { chartConfig: {
image: 'total_calls.svg', image: 'total_calls.svg',
title_column: 'Total Calls', title_column: 'Total Calls',
theme : 'violet', theme : 'violet',
chartType: 'percentage', chartType: 'percentage',
options: {
options: {
percentFactorColumn: 'TARGET_VALUE', percentFactorColumn: 'TARGET_VALUE',
animateScale: true, animateScale: true,
animateRotate: true, animateRotate: true,
...@@ -502,7 +499,7 @@ ...@@ -502,7 +499,7 @@
chartCenterText: "data[0] + '%'", chartCenterText: "data[0] + '%'",
chartCenterTextFont1 : "20px Roboto,sans-serif", chartCenterTextFont1 : "20px Roboto,sans-serif",
condnFormat: [ condnFormat: [
{ {
id: "RED", id: "RED",
expression: "data[0] <= 60", expression: "data[0] <= 60",
colors: [[252, 101, 101], [248, 248, 248]] colors: [[252, 101, 101], [248, 248, 248]]
......
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
<Root> <Root>
<filters display="N"> <filters display="N">
</filters> </filters>
<page_title><![CDATA[CHC SUN Activity]]></page_title>
<page_title><![CDATA[CHC Sales and Target KPI]]></page_title>
<datasource id="1" dataSourceType="datamodel"><![CDATA[CHC_SALES_KPI_DM]]></datasource> <datasource id="1" dataSourceType="datamodel"><![CDATA[CHC_SALES_KPI_DM]]></datasource>
<view id="1" name="Default" type="flatonly">
<view id="1" name="Default" type="flatonly" fixed_refresh="true">
<component datasource="1" id="1" type="COMPOSITE"> <component datasource="1" id="1" type="COMPOSITE">
<component_icon><![CDATA[]]></component_icon> <component_icon><![CDATA[]]></component_icon>
<ComponentTitle><![CDATA[]]></ComponentTitle> <ComponentTitle><![CDATA[]]></ComponentTitle>
...@@ -13,18 +16,58 @@ ...@@ -13,18 +16,58 @@
<component_descr><![CDATA[]]></component_descr> <component_descr><![CDATA[]]></component_descr>
<layout> <layout>
<html><![CDATA[]]></html> <html><![CDATA[]]></html>
<style></style>
</layout> </layout>
<composite> <!-- Changes done on 4-APR-20 [for YTD,MTD] START -->
<composite>
<composite_type><![CDATA[CARD_PANEL]]></composite_type>
<composite_id><![CDATA[_composite_ytd_mtd_wise_kpi]]></composite_id>
<composite_descr><![CDATA[Quarterly Sales and Target Values]]></composite_descr>
<composite_css><![CDATA[db-col-1]]></composite_css>
<link_metadata><![CDATA[chc_sales_brands_kpi]]></link_metadata>
<column_group id="1">
<columns>
<column id="1" type="string" filterBy="PRD_QTR"><![CDATA[YTD,MTD]]></column>
</columns>
</column_group>
<composite_config><![CDATA[
{
component_type: 'SIMPLE_CARD',
card_col_css : 'card-col-2',
detailModel: {
image_column: 'image',
image: 'date_white.svg',
title_column: 'PRD_QTR_STR',
info_column: 'ACTUAL_VALUE_STR',
theme_column : 'THEME_COLOR'
},
dataFormats: [
{
id: "ACTUAL_VALUE",
formatCondition: "data['SALES_VAL'] ",
formatExpressions: [
" data['ACTUAL_VALUE_STR'] = formattedValue(data['SALES_VAL'], 'MAX_FR_DIG_2' )"
]
}
]
}
]]></composite_config>
</composite>
<composite>
<composite_type><![CDATA[CARD_PANEL]]></composite_type> <composite_type><![CDATA[CARD_PANEL]]></composite_type>
<composite_id><![CDATA[_composite_quarterwise_kpi]]></composite_id> <composite_id><![CDATA[_composite_quarterwise_kpi]]></composite_id>
<composite_descr><![CDATA[Quarterly Sales and Target Values]]></composite_descr> <composite_descr><![CDATA[Quarterly Sales and Target Values]]></composite_descr>
<composite_css><![CDATA[db-col-1]]></composite_css> <composite_css><![CDATA[db-col-1]]></composite_css>
<link_metadata><![CDATA[]]></link_metadata> <link_metadata><![CDATA[chc_sales_brands_kpi]]></link_metadata>
<column_group id="1"> <column_group id="1">
<columns> <columns>
<column id="1" type="string" aggFunction="SUM" groupBy="PRD_QTR"><![CDATA[SALES_VAL,TARGET_VAL]]></column> <column id="1" type="string" filterBy="PRD_QTR"><![CDATA[QTR1,QTR2,QTR3,QTR4]]></column>
</columns>
<columns>
<column id="2" type="string" aggFunction="SUM" groupBy="PRD_QTR"><![CDATA[SALES_VAL,TARGET_VAL]]></column>
</columns> </columns>
</column_group> </column_group>
<composite_config><![CDATA[ <composite_config><![CDATA[
...@@ -39,7 +82,7 @@ ...@@ -39,7 +82,7 @@
order_column: 'PRD_QTR', order_column: 'PRD_QTR',
sub_info_column: 'DESCR', sub_info_column: 'DESCR',
theme_column : 'THEME_COLOR', theme_column : 'THEME_COLOR',
sales_info_str_column : "Sales", sales_info_str_column : "Sales",
target_info_str_column : "Target" target_info_str_column : "Target"
}, },
chart_properties: { chart_properties: {
...@@ -81,7 +124,8 @@ ...@@ -81,7 +124,8 @@
} }
} }
]]></composite_config> ]]></composite_config>
</composite> </composite>
<composite> <composite>
<composite_type><![CDATA[CHART_PANEL]]></composite_type> <composite_type><![CDATA[CHART_PANEL]]></composite_type>
<composite_id><![CDATA[_composite_acct_prd_month_wise_summary]]></composite_id> <composite_id><![CDATA[_composite_acct_prd_month_wise_summary]]></composite_id>
...@@ -89,6 +133,12 @@ ...@@ -89,6 +133,12 @@
<composite_css><![CDATA[db-col-1]]></composite_css> <composite_css><![CDATA[db-col-1]]></composite_css>
<link_metadata><![CDATA[]]></link_metadata> <link_metadata><![CDATA[]]></link_metadata>
<column_group id="1">
<columns>
<column id="1" type="string" filterBy="PRD_QTR"><![CDATA[QTR1,QTR2,QTR3,QTR4]]></column>
</columns>
</column_group>
<composite_config><![CDATA[ <composite_config><![CDATA[
{ {
chartDetailModel: { chartDetailModel: {
...@@ -99,7 +149,7 @@ ...@@ -99,7 +149,7 @@
target_column : 'TARGET_VAL', target_column : 'TARGET_VAL',
sh_descr : 'SH_DESCR' sh_descr : 'SH_DESCR'
} }
}, },
chartConfig: { chartConfig: {
chartType: 'bar', chartType: 'bar',
image: 'total_calls.svg', image: 'total_calls.svg',
...@@ -126,7 +176,6 @@ ...@@ -126,7 +176,6 @@
pointHoverBorderWidth: 2, pointHoverBorderWidth: 2,
backgroundColor : "rgba(1, 162, 127, 1)" backgroundColor : "rgba(1, 162, 127, 1)"
} }
], ],
options: { options: {
x_column_label: 'Duration', x_column_label: 'Duration',
...@@ -141,7 +190,8 @@ ...@@ -141,7 +190,8 @@
tooltips: { tooltips: {
callbacks: { callbacks: {
label: function(tooltipItem, data) { label: function(tooltipItem, data) {
var label = '\u20B9 ' + tooltipItem.yLabel + ' in ' + tooltipItem.xLabel ; //var label = '\u20B9 ' + tooltipItem.yLabel + ' in ' + tooltipItem.xLabel ;
var label = formattedValue( tooltipItem.yLabel, 'MAX_FR_DIG_2' );
return label; return label;
}, },
title: function(tooltipItem, data) { title: function(tooltipItem, data) {
...@@ -150,48 +200,41 @@ ...@@ -150,48 +200,41 @@
}, },
backgroundColor: 'rgba(0,0,0,1)' backgroundColor: 'rgba(0,0,0,1)'
} }
}, },
chartScales: { chartScales: {
xAxes: [ xAxes: [
{ {
ticks: ticks: {
{ callback: function( label, index, labels ) {
callback: function( label, index, labels ) { if ( /\s/.test( label ) ) {
if ( /\s/.test( label ) ) { return label.split( " " );
return label.split( " " ); } else {
} else { return label;
return label; }
} },
fontSize: 10
}, }
fontSize: 10
}
} }
], ],
yAxes: [ yAxes: [
{ {
ticks: ticks: {
{ fontSize: 10,
fontSize: 10, beginAtZero: true,
beginAtZero: true, min: 0,
min: 0, callback: function(value, index, values) {
callback: function(value, index, values) { if (Math.floor(value) === value) {
if (Math.floor(value) === value) { return value;
return value;
}
} }
} }
}
} }
] ]
}
}
} }
} }
]]></composite_config> ]]></composite_config>
</composite> </composite>
</component> </component>
</view> </view>
</Root> </Root>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<Root> <Root>
<filters display="N"> <filters display="N">
<filter type="1"> <filter type="1">
<default_value><![CDATA[]]></default_value> <default_value><![CDATA[CURRENT_PERIOD]]></default_value>
<col_name><![CDATA[PRD_CODE]]></col_name> <col_name><![CDATA[PRD_CODE]]></col_name>
<col_descr><![CDATA[Period Code]]></col_descr> <col_descr><![CDATA[Period Code]]></col_descr>
<col_id><![CDATA[prdCode]]></col_id> <col_id><![CDATA[prdCode]]></col_id>
...@@ -205,6 +205,13 @@ ...@@ -205,6 +205,13 @@
formatExpressions: [ formatExpressions: [
" data['ACTUAL_VALUE_STR'] = formattedValue(data['ACTUAL_VALUE'], '%' ) " " data['ACTUAL_VALUE_STR'] = formattedValue(data['ACTUAL_VALUE'], '%' ) "
] ]
},
{
id: "ACTUAL_VALUE",
formatCondition: " data['FLD_NAME'] == 'SALES_ECO' ",
formatExpressions: [
" data['ACTUAL_VALUE_STR'] = formattedValue(data['ACTUAL_VALUE'], '%' ) "
]
} }
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment