Remove numbers of Graph

2 posts, 1 answers
  1. Raúl
    Raúl avatar
    7 posts
    Member since:
    Jan 2017

    Posted 20 Jan Link to this post

    Hello, I have a graph with the following code:

    <RadCartesianChart
        row="0"
        height="200px"
        backgroundColor="#fff"
        width="90%"
        class="x"
        showLabels="false">
        <SplineAreaSeries
            selectionMode="None"
            showLabels="false"
            tkCartesianSeries
            seriesName="Area"
            [items]="categoricalSource"
            categoryProperty="Country"
            valueProperty="Amount"
            stackMode="None">
        </SplineAreaSeries>
        <RadCartesianChartGrid
            tkCartesianGrid
            horizontalLinesVisible="false"
            verticalLinesVisible="true"
            horizontalStripLinesVisible="false"
            verticalStripLinesVisible="false"
            verticalStrokeColor="#a0a0a0" 
            verticalStrokeWidth="1">
        </RadCartesianChartGrid>
        <CategoricalAxis
            tkCartesianHorizontalAxis
            labelTextColor="#cb4b16"
            labelSize="10"
            lineThickness="1"
            lineColor="#a0a0a0">
        </CategoricalAxis>
        <LinearAxis
            tkCartesianVerticalAxis
            labelTextColor="#000"
            horizontalLocation="Left"
            lineHidden="true">
        </LinearAxis>
        <Palette
            tkCartesianPalette
            showLabels="false"
            seriesName="Area">
            <PaletteEntry
                tkCartesianPaletteEntry
                fillColor="#FF007F"
                strokeColor="#FF0049">
            </PaletteEntry>
        </Palette>
    </RadCartesianChart>

     

    What I need is remove the numbers at left side of the graph but I cannot do it.

    Any help is welcome.

    Regards.

  2. Answer
    Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    182 posts

    Posted 23 Jan Link to this post

    Hi Raul,

    In my understanding, the desired behaviour is that you want your LinearAxis (vertical) to be hidden by default.To achieve that, you can set hidden property to the axis.

    e.g.
    <LinearAxis
        tkCartesianVerticalAxis
        labelTextColor="#000"
        horizontalLocation="left"
        hidden="true">
    </LinearAxis>

    In the provided snippet I noticed you used lineHidden which will control if the vertical line (for vertical axes) is visible or not. For better understanding of its purpose, you can test with the following code
    <LinearAxis
        tkCartesianVerticalAxis
        labelTextColor="#000"
        horizontalLocation="left"
        lineHidden="false" lineThickness="3" lineColor="Red"
        hidden="false">
    </LinearAxis>


    Regards,
    Nikolay Iliev
    Telerik by Progress
    Did you know that you can open individual support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top