[CLOSED] Renderer in AxisLabel (MVC)

  1. #1

    [CLOSED] Renderer in AxisLabel (MVC)

    Is there an equivalent in MVC to the chart sample Label Renderer as shown in the webforms samples?

    <ext:NumericAxis                             
                                Fields="Data1"
                                Position="Bottom"
                                Grid="true"
                                Title="Number of Hits"
                                Minimum="0">
                                <Label>
                                    <Renderer Handler="return Ext.util.Format.number(value, '0,0');" />
                                </Label>
                            </ext:NumericAxis>
    From what I can see Renderer isn't a property of AxisLabel
    Last edited by Daniil; Dec 08, 2014 at 2:28 PM. Reason: [CLOSED]
  2. #2
    Hi @AaronDev,

    This appears to be working for me.

    Example
    @(Html.X().Chart()
        .Axes(
            Html.X().NumericAxis()
                .Label(Html.X().AxisLabel()
                    .Renderer(r => r.Handler = "return Ext.util.Format.number(value, '0,0');")
                )
        )
    )
  3. #3
    Thanks.

    I wasn't using the Builder. Instead I was implementing it in the same form as the demos and couldn't see any Renderer properties.

     .Label(
             new AxisLabel {Font = "13px Arial"}
     )
    Using the builder I get intellisense and it works perfect.
  4. #4
    This should be also working.
    @(Html.X().Chart()
        .Axes(
            Html.X().NumericAxis()
                .Label(new AxisLabel
                {
                    Renderer =
                    {
                        Handler = "return Ext.util.Format.number(value, '0,0');"
                    }
                })
        )
    )
  5. #5
    Just tried it and yes it does work. Intellisense doesn't work for me on that property but because it works on other properties on axislabel and I could find any samples with it I had assumed the property wasn't there. I'll not rely on intellisense in the future.

    Thanks again.
  6. #6
    IntelliSense is good, but sometimes it behaves incorrectly. So, yes, please do not rely on that too much.

Similar Threads

  1. [CLOSED] CheckColumn Renderer
    By vmehta in forum 2.x Premium Help
    Replies: 5
    Last Post: Oct 28, 2014, 6:06 AM
  2. Replies: 1
    Last Post: Mar 12, 2013, 10:35 AM
  3. CommandColumn renderer
    By Mr Frogg in forum 1.x Help
    Replies: 5
    Last Post: Jan 26, 2010, 5:38 AM
  4. [0.8.1] Renderer bug
    By SouthDeveloper in forum 1.x Help
    Replies: 6
    Last Post: Jan 25, 2010, 12:28 PM
  5. [0.8.2] CommandColumn and Renderer
    By SouthDeveloper in forum Bugs
    Replies: 4
    Last Post: Jan 20, 2010, 3:54 PM

Tags for this Thread

Posting Permissions