Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
stuwannop
Partner - Creator III
Partner - Creator III

Chart Reference Line on X Axis

Hi everyone

I have a chart plotting unique website hits for our website. Number of hits is on the Y Axis and the Month/Year on the X Axis. I want to add a vertical reference line for November signifying the launch of the new website. How do I do this? I am comfortable with adding a Y Axis reference line but I don't know how to do it based on the X axis (Date). In chart properties > Presentation > Add reference lines the "Continuous X" option is greyed out.

Thanks in advance

Stuart

10 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Go to the Axes Tab -> Click Continue here and then go to referecen line, the option will be enabled.

     Have a look at the attached example.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
stuwannop
Partner - Creator III
Partner - Creator III
Author

Thanks Kaushik - I have looked at your example and done what you said. The problem I am having though is my X axis is a date (mmm/yy) so when I set that I get the error "No Numeric values on X-Axis". I kind of get why it does that, but is there a way around it? I want to put a line on Nov/12 to mark the launch of a new website.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the application attached.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
stuwannop
Partner - Creator III
Partner - Creator III
Author

Thanks again - I've got it to work using just the date (DD/MM/YYYY) as a dimension but I want my X Axis to show by the Month/Year dimension, which I have pre calculated as:

(Date)&' '&right(year(Date),4)

I think this is why it's not working. I could probably get away with just using the straight date but it doesn't look great.

Any ideas how I might change the MMM/YY format so it thinks it's a number?

Stu

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try creating month year field in script like below.

     Monthname(Date) as MonthYear.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hey Stuart,

Where you able to get the text field with the reference line?

I am facing same issue.

Thanks,

Angad

jafari_ervin
Creator III
Creator III

is there any way for no numeric dimension?

pipuindia99
Creator III
Creator III

Even I have same issue, is there any answer or resolution for this issue?

kmarsden
Partner - Contributor III
Partner - Contributor III

Try using error bars instead. You can only set a reference line on a "continuous" x axis which is annoying but error bars should do a job.

Set the expression to "Has error bars", then expand the expression and set an above/below or symmetric value for the error bars. You can then edit the appearance (width, thickness and colour) of the error bars in the presentation tab