Advanced charts -display domain axis values in custom order
I have set up a bar chart which displays values grouped by finacial year quarter, a nominal attribute. The data is displayed with the x-axis labels in alphabetical order rather than cronological order as they appear in the data, ie Q1 2012, Q1 2013, Q2 2012, Q2 2013 etc, as shown below. I need them to be ordered by year and quarter, such as Q1 2012, Q2 2012, Q1 2013, Q2 2013.
Current ordering of x-axis labels
Best Answer
-
yyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
Hi @kcallan,
Unfortunately we do not have the customized order for nominal attributes in advanced charts for now. In charts, RapidMiner maps the first string of the nominal attributes to "0", the second one to "1" etc. To control the ordering of the mapping is by ordering your input data ("sort" operator). If you are using the new "adavanced charts" instead of the "plot view", nominal values are always sorted alphabetically.
Here is a workaround for you. You may change the quarter-year values to year-quarter values by "Generate Attributes" to create a new column like
2012Q1, 2012Q2, ..., 2013Q1,..., 2013Q4, ...
HTH!
YY
1
Answers
Thanks - I will use the workaround you suggest.