qlik-oss/picasso.js

Add new attributes like: "data-* attributes" before chart is mounting

AlexanderGoerlich opened this issue · 6 comments

Description

Hi there,

how can i manipulate the DOM before mounted in for example add tooltip from bootstrap like this one:

demo

In the moment I go this way:

  1. when you go mouseover on tag "rect"

<rect fill="#ff0000" stroke="#000" stroke-width="0" x="219.40540540540542" width="29.91891891891892" y="179.57231047828998" height="320.3979910006436" data-value="4" data-label="Fr"></rect>

  1. then I add new attributes with infos :

data-toggle="tooltip" data-placement="top" title="15941,05"

  1. after that I call:

$('[data-toggle="tooltip"]').tooltip();

  1. then you see a cool tooltip with bootstrap

I know there better ways for that solution.... but how?


And how do I get 2 qMeasureInfos side by side, which lie on the same x-axis?

demo2

Thank you picasso.js

ok... i have a solution for part one:

And how do I get 2 qMeasureInfos side by side, which lie on the same x-axis?

you need two x-axis:

x: { //red data: { extract: { field: "qDimensionInfo/0" }, }, padding: 0.8, align: 0.135 }, x2: { data: { extract: { field: "qDimensionInfo/0" }, }, padding: 0.8, align: 0 },

unbenannt

cbt1 commented

@AlexanderGoerlich Have you looked at this tooltip example?

@cbt1 yes i have!

@AlexanderGoerlich you can have multiple measures on the same axis by offsetting each bar, see this example

@miralemd thx for that!

cbt1 commented

Consider this solved.