Qlik Community

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report

PixelPerfect Charts with a Date and Time field on X axes

Employee
Employee

PixelPerfect Charts with a Date and Time field on X axes

PixelPerfect native charts have some useful features in case you are using a Date and Time dimension for example in X axes.

We will use a QlikView Straight Table object with sales by day.

010.png

Create a new PixelPerfect report, add the straight table object in the Tables node and a new native chart as usual.

020.png

Select a Line Chart, keep only a series of data and go to Data -> Series Binding tab. In the Argument scale type select Date Time and in the Argument select the field of the straight table that contains the date. Using DateTime data scale means that data provided for the series points will be treated as DateTime values and will be shown on the Axis as DateTime values (e.g., January, 2019). 

In the Value select the Sales field.

030.png

Go to the Axes tab and open the Scale Options on the right side tabs. Select Sale mode Continuous, it means that data aggregation is disabled. The original table has sales by day so we will get a chart with a value for each day.

Automatic date-time scale mode, meaning that data is automatically aggregated according to the chosen aggregate function.  Manual date-time scale mode, meaning that you can manually choose the aggregate function using the aggregate function and measure unit properties. I suggest to test also these options to familiarize with them.

040.png

Hide the Point Labels, the Legend and the Marker in the Series View. Run a report preview.

050.png

If you want to see the x axes grid by month, remove the auto grid option and set grid alignment to month.

060.png

Run a preview.

070.pngTo remove the secondary tickmarks, open Axes -> Elements -> Tickmarks and uncheck the Visible flag in the Minor tickmarks area.

 080.png

Ruan a preview.

090.png

Then to change how date are displayed open Axes -> Labels -> Auto than manually insert in the pattern the string {A:MMMM yyyy}. It means argument in the format of first letters of the month followed by the year with four letters. You can also use the format list.

100.png

Run a preview.

110.png

To test the aggregation function go back to the scale options tab and set scale mode to manual, aggregate function to sum and measure unit on month.

120.png

Run a preview.

130.png

Labels (3)
Comments
gargi_bardhan
Contributor

Thank you so much Ruggero !

This post looks its gonna save me 🙂

I am on my way to try the ways you suggested and glad that it had the option not only of 'Continuous' but many.

Will update once resolved.

Great post !! Its really helpful.

Thanks,

Gargi

 

0 Likes
gargi_bardhan
Contributor

Hi Ruggero,

I have one more doubt.

The pdf preview of pixelperfect chart not coming as expected. 

ActualActualReport getting generated in this formatReport getting generated in this format            Any suggestion where to change the setting?

Thanks,

Gargi 

0 Likes
Employee
Employee

Hi,

You can remove the markers from the Series View tab and select Markers on the right.

I suggest you to follow all the chart wizard steps and explore the options to have an overview of what you can do.

Best Regards,

Ruggero

0 Likes
gargi_bardhan
Contributor

Got it, Need to use Swift Plot chart type, I was using Line chart type.

Thanks,

Gargi

0 Likes

that's what i am talking about - well done 🙂

0 Likes
DiM
New Contributor II

Hi Ruggero,

really helpful post, thank you!

But I have one question: What is the condition that I can use the argument scale type "date time"?

I have a calculated dimension in QV straight table which returns date format:  =Date(if(Year(Cal.Date)=Year(Today()),AddYears(Cal.Date,-1),Cal.Date))

With this,  it is only possible to use "Qualitative", but why?

Best regards,

Diana

0 Likes
Employee
Employee

Hi,

I did some tests on my installation and the only solution I found is to add a new calculated field in the reload script created with the formula =Date(if(Year(Cal.Date)=Year(Today()),AddYears(Cal.Date,-1),Cal.Date)). Then add it into the chart, save the QVW and refresh the connection cache.

Best Regards,

Ruggero

DiM
New Contributor II

Your suggestion did the job an now my line chart looks exactly as I wished.

Thank you very much!

Version history
Revision #:
1 of 1
Last update:
‎2019-03-07 08:51 AM
Updated by: