Can't figure it out

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

  • Posted 8 September 2017, 2:21 pm EST

    <P>Can someone show me how to reporoduce the image of the chart attached using the FarPoint chart control. I am struggling.</P>
  • 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

    <P>You can use the LabelNumberFormat property on the y-axis object.  For example...</P>
    <P>    plotArea.YAxes[0].LabelNumberFormat = "$#,##0";</P>
  • Replied 8 September 2017, 2:21 pm EST

    <p>Hello JBrittD,<br><br>Please find attached sample replicating the time-series clustered bar chart created through<br>Spread designer in Spread control.<br><br>In case you want to create the same through code then you can try creating a clustered bar<br>chart and add three different series to it. And to get the axis labels to show dates, you<br>will need to use YPlotArea and supply formatted date strings for the CategoryNames to use in<br>the x-axis.To add category names, you need to use the Add method on the StringCollection<br>(YSeries.CategoryNames.Add).<br>Hope this will help you. </p><p>Thanks.</p>
  • Replied 8 September 2017, 2:21 pm EST

    <P>Hello JBrittD,</P>
    <P>Please find the modified attached sample implementing axis labels to show the dates using CategoryNames.</P>
  • 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

    <P>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.</P>
    <P>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.</P>
  • 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