The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

Changing axes font Size

  1. #1

    Changing axes font Size


    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:

                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!

    Last edited by Daniil; Jun 19, 2012 at 12:18 AM. Reason: Please use [CODE] tags
  2. #2

    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.

Similar Threads

  1. Font Size Change
    By megang in forum 1.x Help
    Replies: 1
    Last Post: Apr 09, 2012, 11:02 AM
  2. [CLOSED] increase font size
    By nhg_itd in forum 1.x Premium Help
    Replies: 1
    Last Post: Sep 29, 2011, 8:04 AM
  3. Change font/button size
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Sep 02, 2010, 4:09 PM
  4. Modify font-size in GridPanel
    By John_Writers in forum 1.x Help
    Replies: 0
    Last Post: Apr 28, 2010, 6:26 AM
  5. [CLOSED] RowEditor font size
    By sharif in forum 1.x Premium Help
    Replies: 5
    Last Post: Mar 02, 2010, 5:08 PM

Posting Permissions