The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How to show percentage in pie chart?

LilCLilC Member Posts: 24 Learner I
edited July 2020 in Help
I have 2 different groups in the pie chart and the results are aggregated.
I want to show the percentage of each group's sales, instead of the sum of the sales.



Also, if I use Marco to calculate the percentage of each store, how can I display both the sales and the percentage in the result (not the chart)?

Can anyone help me with it?  

Best Answers

  • LilCLilC Member Posts: 24 Learner I
    edited July 2020 Solution Accepted
    Hi, Marco, if it is for Sunburst chart, will it work as well?  
    Also, since some are less than 0.9% of the total, if there any way to display them as well?
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Solution Accepted
    Hi,

    No, Sunburst does not support %. I suppose because it is usually very crowded with dozens of elements..
    Regarding your other question, the available space is determined by the library. I would assume it thinks there is not enough space and therefore does not show those anymore. You have too many small elements in the same space for the labels to be shown properly in a pie chart, if you ask me. Those would make the chart not very nice, even if they did fit on the screen.

    Regards,
    Marco

Answers

  • LilCLilC Member Posts: 24 Learner I
    edited July 2020
    Thanks, Marco, you are awesome.
    Because I really need to show those top 10 stores' individual percentage.
    Is there a way to display them on the side of the bar chart?

    If not I'll just use macro to add a column.
  • Loan_Nguyen56Loan_Nguyen56 Member Posts: 8 Contributor I
    I want to show that in Rapid, please hep me. Thanks.

  • ksgenzerksgenzer Member Posts: 2 Learner I
    edited November 2023
    Hi @Marco_Boeck, is there a way to specify pie chart colors using hex codes? And can you specify the font (not just the size) for the labels?
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    edited November 2023
    Hi @ksgenzer,

    Yes, you can specify the colors via hex code. You need to manually modify the configuration file, though. See the attached configuration for the Iris sample data set. It uses a simple red/green/blue color array in line #119 for the colors element of the styleConfiguration of the plotConfiguration.
    "colors" : ["#ff0000", "#00ff00", "#0000ff"],
    The font itself however cannot be specified unfortunately.

    Kind regards,
    Marco
  • ksgenzerksgenzer Member Posts: 2 Learner I
    That worked great--thank you @Marco_Boeck !
Sign In or Register to comment.