Jump to content
Software FX Community

ChartFX 8 boxplot colors.


Guest Skyler Swanson

Recommended Posts

Guest Skyler Swanson

I am having trouble with the boxplot graphic colors. The monochrome flag doesn't seem to do anything and there is no way to change the colors outside of selecting a different palette. The plots are way too colorful for my audience. Any help would be appreciated.

Link to comment
Share on other sites

You can change the colors used by the boxplot, provided that you execute this code after the data has been passed to the chart and the chart has been set to use boxplot

            int index = stats.Gallery.BoxPlot.ShowOutliers ? 2 : 1;
            chart1.Series[index + 1].Color = Color.LightGray;
            chart1.Series[index + 1].Border.Color = Color.Black;
            chart1.Series[index + 2].Color = Color.LightGray;
            chart1.Series[index + 2].Border.Color = Color.Black;
            chart1.Series[index].Color = Color.Black;
            chart1.Series[index+3].Color = Color.Black;
 

Please note that indices are different depending on whether you are showing Outliers or not.

We will be uploading a hotfix for the ignored BoxPlot.Monochrome property in a couple of days, please note that even after installing the hotfix, you will need code to set the colors you want to use, as Monochrome will mean we share the attributes between the upper and lower whiskers and the upper and lower box, so with the hotfix you would need something like

            stats.Gallery.BoxPlot.Monochrome = true;

            chart1.Series[0].Color = Color.LightGray;
            chart1.Series[0].Border.Color = Color.Black;
            chart1.Series[3].Color = Color.Black;

To download a hotfix you will need to have a valid StudioFX subscription and visit https://www.mysoftwarefx.com/hotfix, you can also post your questions/issues at https://www.mysoftwarefx.com/support.

The hotfixes also include new functionality, e.g. we recently added a boolean ShowMedian property to BoxPlot.

Regards,

JuanC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...