[CLOSED] ChartLabel.RotationDegrees Not Work

  1. #1

    [CLOSED] ChartLabel.RotationDegrees Not Work

    The default label of barseries is vertical way but we want it present as horizonal with X.ChartLabel().RotationDegrees(90) which doesn't work.

    Code
    X.CartesianChart()
        .Height(370)
        .AnimationConfig(new AnimConfig { Duration = 250, Easing = Easing.EaseOut })
        .Store(
            storeAllRadioDevicesBar
        ).Axes(
            X.NumericAxis()
                .Position(Position.Left)
                .Fields("數量")
                .Minimum(0)
                .Renderer(r => r.Handler = "return (((label%1==0)?label.toFixed(0):'')+((Ext.getCmp('ComboBoxReportType' + handlerPrint_Report5.getVariable()).getValue()=='申請數量')?'':'%'));")
                .Grid(true),
            X.CategoryAxis()
                .Position(Position.Bottom)
                .Fields("單位")
                .Grid(true)
                .Renderer(r => r.Handler = "return (handlerPrint_Report5.renderLabel(label));")
        ).Series(
            X.BarSeries()
                .XField("單位")
                .YField("數量")
                .StyleSpec(
                    X.SeriesSprite().Opacity(0.8).MinGapWidth(10))
                        .HighlightConfig(
                            X.Sprite()
                                .FillStyle("rgba(249, 204, 157, 1.0)")
                                .StrokeStyle("black")
                                .LineWidth(2)
                ).Label(
                    X.ChartLabel()
                        .Display(SeriesLabelDisplay.InsideEnd)
                        .Field("數量")
                ).Tooltip(
                    X.ChartTip()
                        .TrackMouse(true)
                        .Renderer(r => r.Fn = "handlerPrint_Report5.barAllTipRenderer")
                )
                .Listeners(lis => {
                    lis.ItemDblClick.Handler = "handlerPrint_Report5.onItemDblClick(item.record);";
                })
        )
        .Plugins(
            X.ChartItemEvents()
        )
    Click image for larger version. 

Name:	2017-04-12 10_30_49-民用通資器材申請數&#37.png 
Views:	29 
Size:	5.8 KB 
ID:	24910

    The Code we try to rotate it.

     X.ChartLabel()
            .Display(SeriesLabelDisplay.InsideEnd)
            .Field("數量")
            .RotationDegrees(90)
    Any suggestion?
    Ted
    Last edited by fabricio.murta; Apr 13, 2017 at 2:21 AM.
  2. #2
    Hello @u8621011!

    Suggestion would be trying to use .Orientation(Orientation.Vertical).

    Let us know whether that helped or not! Remember our last thread if you need it written with the numbers not turned also.

    Hope it helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello Fabricio,

    It works!~ Thanks for your quick support.

    Ted
  4. #4
    Hello Ted! Thanks for the feedback, we really appreciate it! And glad it helped you out!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 2
    Last Post: Apr 23, 2016, 6:21 PM
  2. Replies: 1
    Last Post: Feb 27, 2015, 7:33 PM
  3. Ext.Net does not work under IE9
    By nov30th in forum 1.x Help
    Replies: 13
    Last Post: Feb 14, 2012, 9:08 AM
  4. MVC Ext.Net isn't work
    By flaviodamaia in forum Bugs
    Replies: 2
    Last Post: Jun 30, 2010, 4:44 PM
  5. Replies: 2
    Last Post: Mar 16, 2009, 1:50 PM

Posting Permissions