JQPlot stacked bar each stacked label count instead of accumulation (incremental) count

后端 未结 4 444
不知归路
不知归路 2021-01-12 20:17

I want to display label text in stead of segment total for each label.

Like, 2, 7, 14 should be in stacked bar with 2, 7, 14 and then 23 is total. But currently in e

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 20:39

    I have a solution for it as it seems that independent of the value of the stackedValue parameter the values of the stacked bars are always summed up.

    My solution to this problem involved:

    • adding of one more series which serves as the sum, the values you fill it with are all the same (i.e. 3) as their only role is to position the labels,

    • making the last series (5th) invisible and its shadow nearly transparent,

    • and using the labels on each series directly rather than letting the script decide what to put there, otherwise it would obviously sum up the values.

    My solution could be found here.


    EDIT

    I have recently spotted that there already was a solution for this problem available here.

提交回复
热议问题