Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

chart legend on bars

Hi guys,

is it possible to show the bar chart legend as the attachment image?

Thanks.

N.

1 Solution

Accepted Solutions
Not applicable
Author

Hi edp.

Try to change chart type to (combo chart) add the second expression with dual function, like in attached file.

Regards,

Bartek

View solution in original post

9 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Yes,  in the Tab "Number" of the chart select your format and before it write your text, something like

'MyTest' & ###.#

let me know

Anonymous
Not applicable
Author

...Maybe I didn't explain very well...I'd like to show a text associated to the expression without compromise the number format; the attached example perhaps shows much better what I'm looking for...a free text associated to each expression and shown for each bar.

Hope it's clear now.

Thanks.

N.

NickHoff
Specialist
Specialist

Create a new expression with your calculation and under expression uncheck all display options except symbol, change it to symbol you'd like to use.

In another sense you can keep your current expressions, but add a new one with a different option selected and set bar to invisible.

alexandros17
Partner - Champion III
Partner - Champion III

Try with this

Not applicable
Author

Hi edp.

Try to change chart type to (combo chart) add the second expression with dual function, like in attached file.

Regards,

Bartek

giakoum
Partner - Master II
Partner - Master II

The closest you can get is put the text in the expression label and the click on "Text on axis" :

Capture.PNG

MarcoWedel

Hi,

one solution could be to create dual values in your expression:

QlikCommunity_Thread_149578_Pic1.JPG

QlikCommunity_Thread_149578_Pic2.JPG

QlikCommunity_Thread_149578_Pic3.JPG

hope this helps

regards

Marco

MarcoWedel

The dual function formats underlying numerical values with a textual representation of your choice.

See help:

regards

Marco

Dual

dual( s , x )

Forced association of an arbitrary string representation s with a given number representation x. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. This function can be used in scripts and chart expressions.

In scripting, the dual function is typically used early in the script, before other data is read into the field concerned, in order to create that first string representation, which will be shown in list boxes etc.

Note!
If a dual value is too large to fit in a field object, it will be represented by ## and not truncated with ... like a string.

Example (scripting):

load dual ( string,numrep ) as DayOfWeek inline

[ string,numrep

Monday,0

Tuesday,1

Wednesday,2

Thursday,3

Friday,4

Saturday,5

Sunday,6 ];

load Date, weekday(Date) as DayOfWeek from afile.csv;

The script example will generate a field DayOfWeek with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field.

QlikView 11.20 SR9

Anonymous
Not applicable
Author

Thank you so much for your very elegant solution and thank all the others for the help.

N.