FlexChart issues

Posted by: rand.random on 8 February 2021, 6:23 pm EST

  • Posted 8 February 2021, 6:23 pm EST

    We are facing 3 "issues" with FlexChart/FlexPie we haven't found a way to overcome.
    See the attached project which demonstrates our problems.

    FlexChartIssues.zip

    • ChartType "Bar" somehow interprets a int as a DateTime
      FlexPie doesn't seem to give a way to format the Legend
      Color Palette is repetive with the excact color codes instead of relying on different shades of the same color, for comparison look at this excel chart, where blue is present in various shades from very light to very dark


  • Replied 8 February 2021, 6:31 pm EST

    OffTopic Question: Is it known and desired that the original post can not be edited?
    I messed up the "list" of issues, I desired to have it look like this, but I can't edit it


    • ChartType "Bar" somehow interprets a int as a DateTime

    • FlexPie doesn't seem to give a way to format the Legend

    • Color Palette is repetive with the excact color codes instead of relying on different shades of the same color, for comparison look at this excel chart, where blue is present in various shades from very light to very dark




    This post can be edited just fine.
  • Replied 8 February 2021, 6:32 pm EST

    Here a screenshot where you can see the "Edit" Button is missing, for the original post.

  • Marked as Answer

    Replied 9 February 2021, 7:41 pm EST

    Hi,

    Thank you for sharing the sample.

    > ChartType "Bar" somehow interprets a int as a DateTime

    As I can observe, it is not specific to Bar chart. You have specified FlexChart's BindingX to 'DateTime' and Count Series's Binding property to 'Count'. Since, the Axis you are displaying on Top belongs to Count series (whose X axis is bound to DateTime) and hence the behavior.

    If the BindingX/Binding properties of Series are not set then the Series uses FlexChart's BindingX/Binding properties.

    JFYI, when Bar chart is used it then all the series Binding/BindingX properties works in reverse order.

    > FlexPie doesn't seem to give a way to format the Legend

    We are sorry but FlexPie currently doesn't support legend formatting. However, this seems like a valid requirement so I have raised an enhancement request for the same. [Internal tracking ID - C1CHART-1811]

    Just in case required you can use the following workaround to set the Legend Format.

    private void SetLegendFormat()
    {
    var pieCanvas = Template.FindName("canvas", this) as Canvas;
    var legendCanvas = pieCanvas.Children.OfType<Canvas>().First();

    foreach (var textBlock in legendCanvas.Children.OfType<TextBlock>())
    {
    if (textBlock.Text.IsDateTime(out DateTime date))
    textBlock.Text = date.ToString(LegendFormat);
    else
    textBlock.Text = string.Format("{0:"+LegendFormat+"}", textBlock.Text);
    }
    }


    Please refer to the same from the attached modified sample. (see FlexChart_Mod.zip)

    > Color Palette is repetive with the excact color codes instead of relying on different shades

    This is the default behavior of FlexPie. However, you can manually set the FlexPie palette using its CustomPalette property as follows:

    flexPiePalette.Palette = C1.Chart.Palette.Custom;
    flexPiePalette.CustomPalette = new CustomPalette(100);

    Please refer to the attached sample for full implementation.

    > OffTopic Question: Is it known and desired that the original post can not be edited?

    We are discussing it internally and will get back to you when there is any update.

    Best Regards,

    Kartik

    FlexChart_Mod.zip
  • Replied 10 February 2021, 3:51 pm EST

    Hi,

    > OffTopic Question: Is it known and desired that the original post can not be edited?

    It is by design that the original post is not editable. Follow up comments may be added or deleted.

    And also It is hoped that if the original post is not correct, then you should remove it and create another.

    Best Regards,
    Kartik
  • Replied 16 February 2021, 7:28 pm EST

    And also It is hoped that if the original post is not correct, then you should remove it and create another.

    How? As you can see from the screenshot also the delete button is missing from the first post.
  • Replied 23 February 2021, 10:58 pm EST

    Hi,

    I apologize for the confusion.

    Deleting the initial post is currently not available for the users. However, we have noted the same for future enhancement and will let you know when there is any update regarding the same.

    Best Regards,

    Kartik
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels