Skip to Content
author's profile photo Former Member
Former Member

SAP UI5 VIZ line chart - Xaxis to set Interval

Hi Experts ,

How to set X-axis interval counts on SAP UI5 Viz Line charts .

In scenario like i am querying for 45 days have labels on X-axis for all 45 data points as in screen shot . Is there any way to setting interval as 4 .

As we do in Applet's .

Below are the code i am trying.

oDataset = new{

dimensions : [


axis : 1, // must be one for the x-axis, 2 for y-axis

name : 'SampleDateTime',

value : '{SampleDateTime}'



labels: {

xaxis : {

tickDateRangeFromChartData : false



measures : [{

name : 'Ni', // 'name' is used as label in the Legend

value : '{Ni}' // 'value' defines the binding for the displayed value



data : {

path : "/Rowsets/Rowset/0/Row"




x-axis.png (25.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 18, 2016 at 04:24 AM

    Do you mean,

    1. while keeping SampleDateTime on xAxis, adding some indicates (like drawing a line on UI) to show the intervals? Like dividing 45 by 4 so SampleDateTime will be in groups like 1st-11th/12th-22nd/23rd-33rd/34th-45th. Then adding a bold vertical line between 11th and 12th date, between 22nd and 23rd, etc?


    2. change the value of SampleDateTime on xAxis like 1st-11th changed to interval-1, 12th-22nd changed to interval-2, etc?

    Maybe you could share a screenshot on how you implement on Applet. 😊

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Chapman ,

      Its similar to second scenario , My requirement to get minimal label in x -axis

      1) From 15th June to 30th July - we will get 45 rows from query .

      2)So plotting 45 labels on x -axis is congested, so i wants to show start date (15th June) as and end date (30 th July) , i want to splits label alone in count of 5 .

      3) So in count of 45 values - 9 labels on x- axis (In applet we do by increasing Ticks Per label & Max no of Ticks) .

      so line chart data will be plotted for 45 points and in x axis only 9 label will be visible



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.