-
Changing axes font Size
Hello,
Im trying to change a font size of a axes in the code behind but i cant make it work.
Take a look to my code:
Code:
Chart1.Axes.Clear();
Ext.Net.NumericAxis axis = new Ext.Net.NumericAxis();
Ext.Net.CategoryAxis caxis = new Ext.Net.CategoryAxis();
axis.Fields = new string[] { "YField" };
axis.Maximum = null;
axis.Title = "teste";
axis.Position = Ext.Net.Position.Bottom;
axis.Grid = true;
axis.Minimum = 0;
caxis.Fields = new string[] { "XField" };
caxis.Title = "Date";
caxis.Label.FontSize = "9px Arial"; --here i get the error: Object reference not set to an instance of an object.
Please help me!
Thanks.
-
Hi,
I guess you do not recreate that Label during DirectEvent. You should recreate it.
Also please note if you want these changes during DirectEvent will be affected on client, you should re-render the Chart.