Can't figure it out

Posted by: jbrittd on 8 September 2017, 2:21 pm EST

  • Posted 8 September 2017, 2:21 pm EST

    Can someone show me how to reporoduce the image of the chart attached using the FarPoint chart control. I am struggling.


    2010/05/Example.PNG
  • Replied 8 September 2017, 2:21 pm EST

    Thank you so much for you help!!!! One last question: How do I format the dollar values along the y-axis?
  • Replied 8 September 2017, 2:21 pm EST

    JBrittD,


    You can use the LabelNumberFormat property on the y-axis object.  For example...


        plotArea.YAxes[0].LabelNumberFormat = "$#,##0";

  • Replied 8 September 2017, 2:21 pm EST

    Hello JBrittD,

    Please find attached sample replicating the time-series clustered bar chart created through
    Spread designer in Spread control.

    In case you want to create the same through code then you can try creating a clustered bar
    chart and add three different series to it. And to get the axis labels to show dates, you
    will need to use YPlotArea and supply formatted date strings for the CategoryNames to use in
    the x-axis.To add category names, you need to use the Add method on the StringCollection
    (YSeries.CategoryNames.Add).
    Hope this will help you.

    Thanks.


    2010/05/TimeSeries.zip
  • Replied 8 September 2017, 2:21 pm EST

    Hello JBrittD,


    Please find the modified attached sample implementing axis labels to show the dates using CategoryNames.


    Thanks.


    2010/06/TimeSeriesModified.zip
  • Replied 8 September 2017, 2:21 pm EST

    Thanks for all the help again. But when using the LabelNumberFormat by itself, it seems to write a new label on top of the auto generated one. How do I prevent that from happening?
  • Replied 8 September 2017, 2:21 pm EST

    JBrittD,


    The LabelNumberFormat property determines how the existing labels for the axis are formatted.  The property would not cause new labels to be painted on top of the existing labels for the axis.


    My guess is that you mistakenly added a second y-axis to the plot area.  Before setting the LabelNumberFormat property, both axes might have painted the same text at the same locations which would have made it look like a single axis.  After setting the LabelNumberFormat property for one of the axis, the two axes would paint different text at the same locations.  Note that the plot area initially has a single y-axis in the y-axes collection.  If you added a new y-axis to the y-axes collection without removing the original y-axis then you could end up with the text on top of text appearance that you have described.

  • Replied 8 September 2017, 2:21 pm EST

    Thank you!!!
Need extra support?

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

Learn More

Forum Channels