Multiple chart

Definition

<cst-multi-chart>
<sub-theme/>
<sub-font/>
<sub-style/>
<sub-feature-flag/>
<sub-access-ctrl/>
<sub-raw-attributes/>
</cst-multi-chart>

Example

<cst-multi-chart>
<sub-theme name="" clr-var1="" clr-var2=""/>
<sub-font name="" font-var1="" font-var2=""/>
<sub-style name="" width="" height=""/>
<sub-feature-flag show-chart-type="">
<sub-access-ctrl can-view="" can-click="" can-change-type="">
<sub-raw-attributes class="">
</cst-multi-chart>

OR

<cst-element name="multi-chart" schema="" schema-prop=""/>

Attributes

AttributeValueDescription
idstring typeIdentifier for component.

sub-theme

object typeSpecifies theme to be used for component.

sub-font

object typeSpecifies fonts to be used for component.

sub-style

object typeSpecifies style to be applied to component.

sub-feature-flag

objectSpecifies what features to enable/disable.

sub-access-ctrl

objectSpecifies what access is given.

sub-raw-attributes

objectSpecifies raw attributes.
otherany typeAny other info.
schemaobject type Specifies JSON schema.
schema-propstring typeSpecifies property to be used to pick schema.

Sub element attributes

sub-theme

PropertyValueDescription
nameprimary(default)/secondary/customName of the theme.
clr-val1string typeValue of color variables.

sub-font

PropertyValueDescription
nameroboto (default)/customName of the font
font-var1stringValue of font variables.

sub-style

PropertyValueDescription
namematerial/skeuomorphic(standard/filled/shaped-filled/outlined/shaped-outlined)Name of design to be used.
widthpercentage/pixels/string(x-small,small,medium,large,x-large)Gives width/any other prop value

sub-feature-flag

PropertyValueDescription
show-chart-typeboolean typeSpecifies which chart type to be shown.

sub-access-ctrl

PropertyValueDescription
can-viewboolean typeSpecifies if user has access to view component.
can-clickboolean typeSpecifies if user has access to click on component.
can-change-typeboolean typeSpecifies if user has access to change default type of chart.

sub-raw-attributes

PropertyValueDescription
classstringSpecifies class name to be applied on component.

Schema Examples

Full schema

{
id :'', //auto generates by default
type: 'bar/line',//default bar
charts:[{
id :'', //auto generates by default
data: [{ //default [] (external)
label: 'JAN',
values: [10, 20]
},
{
label: 'FEB',
values: [15, 30]
}, {
label: 'MAR',
values: [40, 30]
}
],
}],
initalIdsAPI:{
method:'GET',//default
url:'',
body:{}
},
dataByIdsAPI:{
method:'GET',//default
url:'',
body:{}
},
options: {
labels:{
xAxis:'Months', //custom color UI
yAxis:'Count', //custom color UI
values:['Tender Count','Auction Count'] //data set & on hover labels
},
title:'',
accessCtrl: false //default, on true explicitly pass subAccessCtrl
},
callbacks:{
onClickMultipleChart:'onClickMultipleChart', //default if function exists in parentThis
onChildToParentMultipleChart:'onChildToParentMultipleChart', //default if function exists in parentThis
onDataFormatMultipleChart:'onDataFormatMultipleChart'
},
instance:'', //some parentContext variable holding instance
subFeatureFlags:{
showChartTypes:{
bar: true, //default
pie: true, //default
line: true,
card: false,
table: false
}
},
subAccessCtrl:{
canView:false,
canClick: false,
canChangeType:false
},
subTheme:{
name:'PRIMARY/ SECONDARY/ EXACT_COLOR_THEME',
clrVar1:'',
clrVar2:''
},
subFont:{
name:'PRIMARY/ SECONDARY/ EXACT_FONT_STYLE',
fontVar1:'',
fontVar2:''
},
subStyle:{ //loop & add to element style
name: '',
width:'', //aspect ratio maintained if one given
height:''
},
subRawAttributes:{ //loop & add to element style
class: '',
}
}

OverRidable Classes

Unit Test Screenshots

Responsiveness Test Screenshots

Design Images

Demo link

Points

  • fonts (text - Subtitle 1 - Regular 16, Label - Caption - Regular 12)
  • EXT trigger cases
  • Check logging, security, performance & flexibility