Pre loader

Dynamic width and height of Point Markers

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hello. I need to provide custom point marker with height and width based on my data, but trying to implement BasePointMarker I have the center points but not the original data to make the width and height based in my original binding. Is there a solution to do that? Thank you.

Tommy Garcia.

  • You must to post comments
0
0

Hi Tommy,

The short answer is no, the BasePointMarker.Draw method is defined like this and has no access to the original data

/// <summary>
/// Renders the PointMarker on each <see cref="Point"/> passed in. Each point is a coordinate in the centre of the PointMarker. 
/// The Pens and Brushes passed in are defaults, which are used in case the local Fill or Stroke are not set
/// </summary>
/// <param name="context">The RenderContext to draw too</param>
/// <param name="centers">The collection of Points to render the Point Markers at</param>
/// <param name="defaultPen">The default Stroke pen (if current pen is not set)</param>
/// <param name="defaultBrush">The default Fill brush (if current brush is not set)</param>
/// <seealso cref="IRenderContext2D"/>
/// <seealso cref="IPen2D"/>
/// <seealso cref="IBrush2D"/>
public virtual void Draw(IRenderContext2D context, IEnumerable<Point> centers, IPen2D defaultPen, IBrush2D defaultBrush)
{
   // ... Draw marker at Centres using Pen, Brush
}

We do however support a Bubble series, which sounds a lot like what you want.

enter image description here

Maybe this can help?

  • You must to post comments
0
0

Thanks for the answer Andrew,

I’ve tried a solution by providing the original data to the custom implementation of the BasePointMarker, however I’m wondering if the center points are strictly in the same order as the data was provided in the view model. could you please confirm me that?, this is to decide if we buy or not this product.

Thanks

  • Andrew Burnett-Thompson
    Hi Tommy, the centre points in BasePointMarker.Draw() are in the original order, but they are pixel coordinates, not data values and they have gone through the process of being resampled, then converted to pixel coords. If you want per-point sizing/drawing and BubbleSeries isn't doing it for you then you could potentially achieve what you want with a CustomRenderableSeries and using our Drawing context directly.
  • You must to post comments
0
0

I understand. I will try the CustomRenderableSeries

Thank you.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies