Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1886
Box and Whisker Chart (candlestick extension)
posted

I am trying to create a Box and Whisker Chart (an example is in the word document within the ZIP file). This is very similar to a candlestick chart except that:

  • The ends of the candlestick wick are terminated with a ‘T’ line
  • Median is displayed as a crossing line inside of the candlestick body
  • Mean is displayed as a Marker on the candlestick Wick.

I have created an prototype (a  very bad example) of what we need, but I think I am really headed in the wrong direction.  It seems to me extending the functionality of the Candlestick would be a lot easier, but I am not sure what direction to proceede.

Any suggestions/examples of a simpler more direct path?

Thanks

 

Frankenchart.zip
Parents
  • 34510
    Offline posted

    Hi Rod,

    Actually from what I see in your example, your doing this the correct way.  You technically could extend the FinancialPriceSeries which contains the candlestick code but you would still need to manually render out the series with your own custom code.  If you wanted to use the candlestick render code, you would need to call the candlestick render code and then go into the root canvas and remove/add extra UIElements to adjust the final look which would require a lot of extra work to figure out what you need to remove and where to add things in the canvas.

    What I suggest doing instead is downloading and taking a look at the source code for FinancialPriceSeries.  In particular, taking a look at the render code in the RenderFrame internal method.  This will show you how we render the candlesticks which you can copy and make changes to, to add your visual adjustments.  The bottom line is that since the render code is handled internally by each series and since you need to change the way the series looks visually, you would generally just create a new custom series as you have already done.  The exception might be if the series you want to extend has properties that you want/need and don't want to rewrite them in a seperate custom series.  This would save time in setting up the property changed notifications as well.  You'd basically just need to override the RenderSeriesOverride method and supply your custom render code, using the already existing properties.  Your properties seem to function differently than the ones used by the candlestick series so I think your approach is the best option here.

    May I ask why you think you are headed in the wrong direction?

Reply Children