X and Y Axis should come with Integer value

3 posts, 0 answers
  1. Sam
    Sam avatar
    11 posts
    Member since:
    Apr 2020

    Posted 20 Apr Link to this post

    I am using Kendo scatter chart by default x and y axis data are coming decimal. i want integer only. i don't want to use Majorunit because it has to be calculated based on series.

    <kendo-chart-series>
    <kendo-chart-series-item type="scatter" [data]="graphData" xField="inc_margin_amt" yField="inc_sales_amt">
    </kendo-chart-series-item>
    </kendo-chart-series>
    <kendo-chart-x-axis>
    <kendo-chart-x-axis-item [min]="graph.xModel.min" [max]="graph.xModel.max">
    </kendo-chart-x-axis-item>
    </kendo-chart-x-axis>
    <kendo-chart-y-axis>
    <kendo-chart-y-axis-item [min]="graph.yModel.min" [max]="graph.yModel.max">
    </kendo-chart-y-axis-item>
    </kendo-chart-y-axis>

    Attaching the image for your reference .

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1282 posts

    Posted 21 Apr Link to this post

    Hello Sam,

    The axis item labels.format option can be used to set the preferred formatting for the labels:

    https://www.telerik.com/kendo-angular-ui/components/charts/api/XAxisItemComponent/#toc-labels

    https://www.telerik.com/kendo-angular-ui/components/charts/api/XAxisLabels/#toc-format

    Here is an example, demonstrating this approach:

    https://stackblitz.com/edit/angular-4paf5w?file=app/app.component.ts

    I hope this helps.

    Regards,
    Dimiter Topalov
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. Sam
    Sam avatar
    11 posts
    Member since:
    Apr 2020

    Posted 22 Apr in reply to Dimiter Topalov Link to this post

    Thank you so much.. appreciate your efforts.
Back to Top