Advanced charts -display domain axis values in custom order

kcallan
kcallan New Altair Community Member
edited November 2024 in Community Q&A

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.

Capture.PNGCurrent ordering of x-axis labels

Best Answer

  • YYH
    YYH
    Altair Employee
    Answer ✓

    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

Answers

  • YYH
    YYH
    Altair Employee
    Answer ✓

    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

  • kcallan
    kcallan New Altair Community Member

    Thanks - I will use the workaround you suggest.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.