icCube - set serie color for 2 dimensions in the columns in a amCharts combo chart -
i have got following dynamic chart (see attached picture). sake of reproducability have created simple chart based on standard iccube's sales model.
the idea have 2 facts on column axes data selected years. distinguish between facts want assign color facts fades on years. when add years, new year color belongs fact, little bit lighter. screenprints below clarify.
my question is: there way amcharts/combo in relation mdx/setting of iccube?
but when de-select 2008, happens:
i have included json can reproduce in sales demo on plain vanilla iccube 5.1.2 installation.
{ "classid": "ic3.reportguts", "guts_": { "ic3version": 12, "schemaname": "sales", "cubename": "sales", "layout": { "classid": "ic3.fixedlayout", "guts_": { "ic3version": 12, "grid": 10, "boxes": [ { "classid": "ic3.fixedlayoutbox", "guts_": { "ic3version": 12, "header": "chart color serie should match selected fact (orange = amount, blue = amount_2)", "behaviour": "fixed box", "noprint": false, "position": { "top": 100, "left": 0, "width": 1021, "height": 421 }, "widgetadapteruid": "w12", "zindex": 2008 } }, { "classid": "ic3.fixedlayoutbox", "guts_": { "ic3version": 12, "header": "select years", "behaviour": "fixed box", "noprint": false, "position": { "top": 0, "left": 60, "width": 630, "height": 80 }, "widgetadapteruid": "w14", "zindex": 2009 } } ], "theme": "classic", "sizeindicator": { "width": 1024, "height": 708 } } }, "widgetmgr": { "classid": "ic3.widgetadaptercontainermgr", "guts_": { "ic3version": 12, "items": [ { "classid": "ic3.amchartscomboadapter", "guts_": { "ic3version": 12, "navigationguts": { "classid": "ic3.amchartsnavigationstrategy", "guts_": { "ic3version": 12, "menuvisibility": { "back": true, "axisxchange": "all", "axisychange": "all", "filter": "all", "reset": true, "widget": true, "others": "all" }, "maxaxismembercount": 10, "selectionmode": "disabled", "drilldownstrategy": { "type": "mdxexpression", "options": { "drd_mdx": "order(nonempty($member.children, @{selmeasure}), @{selmeasure}, bdesc)" } } } }, "ic3_name": "widget-1", "ic3_uid": "w12", "ic3_eventmapper": { "classid": "ic3.eventwidgetmapper", "guts_": { "__ic3_widgeteventsdescription": {}, "fireonrefresh": { "name": "all events (default)", "uniquename": "all", "parentrowid": -1, "type": "ot" }, "ic3queryrefresh": "seldimensie" } }, "ic3_mdxbuilderuid": "m6", "__ic3_widgettypename": "amcharts/combo", "ic3extraoptions": ":{ \"categoryaxis\": {\n \"gridposition\": \"middle\",\n \"gridalpha\": 0,\n \"labelfunction\": function(valuetext, serialdataitem, categoryaxis) {\n return valuetext.substr(0,10).replace(/\\s+/g, '<br>');\n }\n }\n\n }", "graphs": [ { "linethickness": 3, "balloontext": "[[category]]<br>[[title]]: <b>[[fvalue]]</b>" } ], "ic3charttype": [ "column", "column" ], "legendposition": "bottom" } }, { "classid": "ic3.queryfilterbuttonlistadapter", "guts_": { "ic3version": 12, "ic3_name": "widget-0", "ic3_uid": "w14", "ic3_eventmapper": { "classid": "ic3.eventwidgetmapper", "guts_": { "ic3selection": "selyear", "__ic3_widgeteventsdescription": {} } }, "ic3_mdxbuilderuid": "m1", "__ic3_widgettypename": "iccube/buttons", "selectionmode": "multi", "layout": "horizontal" } } ] } }, "constantmgr": { "classid": "ic3.constantsmgr", "guts_": { "constant": [] } }, "cssmgr": { "classid": "ic3.cssmgr", "guts_": {} }, "javascriptmgr": { "classid": "ic3.reportjavascriptmgr", "guts_": { "ic3version": 12, "js": "/** \n * function called each time event generated. \n * \n * @param context same object passed between consumeevent calls. \n * can used store information. \n * { \n * $report : jquery context of report container \n * fireevent : function( name, value ) triggering event \n * } \n * \n * @param event event information \n * \n { \n * name : specified in 'events' tab \n * value : (optional) actual event value \n * type : (optional) e.g., ic3selection \n * } \n * \n * check 'report event names' menu list of available events. \n */ \n/* \nfunction consumeevent( context, event ) { \n if (event.name == 'ic3-report-init') { \n // add code here \n } \n} \n*/ \n" } }, "calcmeasuremgr": { "classid": "ic3.calcmeasuremgr", "guts_": { "measures": [ { "name": "amount2", "expression": "1.1*[amount]", "properties": null } ] } }, "mdxqueriesmgr": { "classid": "ic3.mdxqueriescontainermgr", "guts_": { "mdxqueries": { "classid": "ic3.basecontainermgr", "guts_": { "ic3version": 12, "items": [ { "classid": "ic3.querybuilderwidget", "guts_": { "mdxwizard": { "classid": "ic3.querybuilderwizardform", "guts_": { "rows": [ { "classid": "ic3.querybuilderhierarchyform", "guts_": { "hierarchy": { "name": "product", "uniquename": "[product].[product]" }, "type": "membersoflevel", "membersoflevel": "[product].[product].[article]" } } ], "cols": [ { "classid": "ic3.querybuildermeasuresformbase", "guts_": { "measures": [ { "name": "amount", "uniquename": "[measures].[amount]", "type": "me" }, { "name": "amount2", "uniquename": "[measures].[amount2]", "type": "rcme" } ] } }, { "classid": "ic3.querybuildereventsfilter", "guts_": { "mdxstatement": "@{selyear}" } } ], "filters": [], "nonemptyonrows": false, "nonemptyoncolumns": false } }, "mdxflat": { "classid": "ic3.querybuilderflatmdxform", "guts_": { "usemdxstatement": false } }, "ic3_name": "mdx query-0", "ic3_uid": "m6" } } ] } }, "mdxfilter": { "classid": "ic3.basecontainermgr", "guts_": { "ic3version": 12, "items": [ { "classid": "ic3.newfilterquerybuilderform", "guts_": { "hierarchy": { "name": "year", "uniquename": "[time].[year]" }, "type": "membersoflevel", "membersoflevel": "[time].[year].[year]", "defaultsmdx": "2008,2009,2010", "adddefaultmember": false, "useallmember": false, "usedefaultmemberifempty": false, "ic3_name": "mdx filter-0", "ic3_uid": "m1" } } ] } }, "actionbuilders": { "classid": "ic3.basecontainermgr", "guts_": { "ic3version": 12, "items": [] } } } } } }
it's not possible in current version of reporting ( 5.1.2 ). we're looking here use different palettes depending on selection.
you have create new graph
every column specify valuefield
, color it. number of columns changing, don't know how many graph
should defined.
Comments
Post a Comment