Can you make the bubble size and color dependend on a MDX measure in icCube amChart widget?

心已入冬 提交于 2019-12-08 01:10:49

问题


I am trying to make a dynamic chart in icCube, in which bubbles are sized and colored in accordance with a specific data field in the MDX result set.

Example MDX result set: (the x/y coordinates have been removed for the sake of simplicity):

        amount  color     bullet size
Swiss    100    #0000FF       10
Spain    120    #FF0000       12
NL       70     #00FF00        7

I do not know how to do this now in the amChart widget in icCube, but I know it is possible to do this in amCharts itself. You can set for example the following attributes in the amCharts editor:

  • Alpha field, Bullet field, Bullet size field, Description field, Fill colors field, Label color field, Line color field, ... etc (see for more in the amCharts live editor).

Enclosed a sample chart with two series, in which one has colored bubbles: example

Is it possible in icCube web reporting to do this, and if so, how?


回答1:


Yes it is possible:

The table should look like this:

In your amCharts bubble widget, add the following in Graph:

"colorField":"color" //the name of the column that contains the colors

and set use mdx colors to "no".

I named my colorField "kleur". Any value here is possible, but it has to be the same as the column name that contains the colors.




回答2:


Yes you can, just you have to write the following into the "Extra Options" field:

:{
    graphs:[{
        xField: "your_x_field",
        yField: "your_y_field",
        valueField: "amount",
        bulletSizeField: "bullet size",
        bullet : "round",
        colorField: "color"
    }]
}

Note that, your graphs defined above will be overwritten by this one, you have to specify here all the graph settings.



来源:https://stackoverflow.com/questions/30725575/can-you-make-the-bubble-size-and-color-dependend-on-a-mdx-measure-in-iccube-amch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!