Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
Yianni_Ververis
Employee

In our Qlik Demo Team we are trying to create mashups that are suitable for all devices. This is why we created another version of a Horizontal Bar Chart that we use almost exclusively. This has various options like setting the bar height, color, text color, text hover color etc. It can also change from regular Horizontal Bar Chart to Horizontal Stacked Bar Chart, Grouped Bar Chart or a Lollipop.

All of the UI/UX guidance is coming from my colleague Michael Anthony | Qlik

Installation

Settings

Dimension and Measures

  • Set 1 dimension for the Labels and
  • up to 5 Measures for Grouped, Stacked Bar or Lollipop

General Settings

  • Text Color
  • Font Size

Bar

  • Height
  • Comma separated colors for the stacked bar fill color
  • Fill color when you mouse over
  • Text Color for each bar
  • Text Color when you mouse over
  • Border Weight
  • Border Spacing
  • Enable Selections
  • Toggle between Stacked and Grouped Bar Chart

Tooltip

  • Enable Tooltip
  • Show Dimension in the Tooltip

X-Axis

  • Show X-Axis
  • Show Legend (check Stacked Bar image below)

Y-Axis

  • Show Y-Axis
  • Label Width (Usually 150px, even for the smallest device )
  • Number of visible characters, if you want to truncate your labels.

thumb.png

stackedBar.png

grouped.png

lollipop.png

Even though we still have a long way to go to make this perfect, features are always welcome!

YIANNI

Files

Qlik Branch

8 Comments
simondachstr
Luminary Alumni
Luminary Alumni

Can you provide the source code of the native Qlik Sense Bar Chart?

Also, this extension is developed using SVG, while the native object makes usage of canvas. Any reason why you went a different route?

0 Likes
1,109 Views
Yianni_Ververis
Employee
Employee

Hello Martin,

Unfortunately I do not have source code for the native bar chart.

No particular reason, just because we like D3!

0 Likes
1,109 Views
mgranillo
Specialist
Specialist

Yianni,

A great addition to this would be the ability to select multiple bars.  I've been trying to find a bar chart extension that does this so I don't lose any native Qlik functionality.  Any plans to do that?

Mike

0 Likes
1,109 Views
Yianni_Ververis
Employee
Employee

Yes I will try and put that in 

Thank you Mike

0 Likes
1,109 Views
mgranillo
Specialist
Specialist

Yianni,

Now that i think about it, you also lose access to the exploration menu and the confirm selection frame.  Do your users not care about that functionality? 

Mike

0 Likes
1,109 Views
mgranillo
Specialist
Specialist

Yianni,

I like the tooltip you used in this.

I tried adding it to another extension of mine but get an of message of "d3.tip() is not a function".

Did you have to edit the d3-tip.js script or do anything special to implement this?

Mike

0 Likes
1,109 Views
Yianni_Ververis
Employee
Employee

Hello Mike,

Yes I did.

(function (root, factory) {

  if (typeof define === 'function' && define.amd) {

    define(['./d3.min'], function (d3){

      d3.tip = factory(d3);

    })

  } else if (typeof module === 'object' && module.exports) {

    module.exports = function(d3) {

      d3.tip = factory(d3)

      return d3.tip

    }

  } else {

    root.d3.tip = factory(root.d3)

  }

}(this, function (d3) {

889 Views
mgranillo
Specialist
Specialist

Thanks, I'll look through that.

Mike

0 Likes
889 Views