Replacing the legend in a line chart with labels on each line

One of the problems with a standard QlikView line chart is that the legend is somewhat removed from the chart, and it can be difficult to keep going back and forth between the legend and the data to work out which line is which.

A way of resolving this is to remove the legend and replace it with labels on each line.

Getting ready

Load the following script:

CrossTable(Country, Sales)
LOAD * INLINE [
    Date, USA, UK, Japan, Germany
    2013-01-01, 123, 100, 80, 40
    2013-02-01, 134, 111, 75, 50
    2013-03-01, 155,  95, 70, 60
    2013-04-01, 165,  85, 88, 50
    2013-05-01, 154, 125, 90, 70
    2013-06-01, 133, 110, 75, 99
];

How to do it…

These steps will create a line chart with labels on each line instead of a legend: ...

Get QlikView for Developers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.