The Ext.NET team is thrilled to announce the official release of Ext.NET 4, including the new Spreadsheet Selection Model, Triton Theme and Advanced Color Picker!

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 18, 2012 at 11:18 PM. 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.
    Daniil Veriga
    Developer & Support Expert

Similar Threads

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

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.