Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunny_talwar

Show Month on x-axis (VizLib Line Chart)

Hi All - 

I am trying to create a line chart where I am trying to show daily information while displaying only Month on the x axis...and I am using VizLib chart for this. Here is what I have tried so far.

Step 1: Created a new field in the script using DATE

 

Date(SetDateYear(DATE, Year(Today())), 'DD-MMM') as MONTHDATE,

 

Step2: Created a line chart With

Dimension

 

MONTHDATE
YEAR

 

Expression

 

Sum(VALUE)

 

By default, it shows 6 tick marks like this

image.png

Now, I tried to increase it to 12 ticks, but that still try to space out based on the days

image.png

If I try to use a calculated dimension like this

 

=Dual(Month(MONTHDATE), MONTHDATE)

 

I get a chart like this

image.png

Now the x-axis looks exactly how I want, but the chart doesn't display the same day level information. All I need is the axis like the third image and plot as in 1st/2nd chart.

I hope someone can advice on this.

Best,

Sunny

Labels (2)
2 Replies
sunny_talwar
Author

I was able to get it partially working by enabling Timeaware option after changing the number of ticks to be 12

image.png

Now, I am not sure why this begins with 2019 and not January? Any help is greatly appreciated.

Best,
Sunny

Marcos_rv
Creator II
Creator II


using a hierarchy that contains the date per day next to the year month? I would say as one more dimension, and you add whatever you want, anyway I would create a field in the calendar that is dual (year & '-' & month, year * 12 + month) as year-month.

regards!!!