PDA

View Full Version : [CLOSED] custom chart



rbtceo
Sep 29, 2015, 2:56 AM
Hi All,

there is an example of a bar chart: http://examples2.ext.net/#/Chart/Column/Basic/

Is there any chance to use letters instead of numeric as a value?

I mean: we have one value for a month and it is a letter (a-z) so that YField needs to be letters.

Could you provide an example if it is possible?

Thank you.

rbtceo
Sep 29, 2015, 5:35 AM
Solution (example):


var al = new AxisLabel();
al.Renderer.Fn = @"function( storeItem, item ) {
if ( storeItem == 7 )
return 'A';
else if ( storeItem == 6 )
return 'B';
else if ( storeItem == 5 )
return 'C';
else if ( storeItem == 4 )
return 'D';
else if ( storeItem == 3 )
return 'E';
else if ( storeItem == 2 )
return 'N';
else if ( storeItem == 1 )
return 'M';
else
return ''
}";

myNumericAxis.Label = al;