Pre loader

Tag: PointMarker

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 vote
16k views

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.

1 vote
16k views

Hello,
I am currently evaluating the chart library, and plotting a FastLineRenderableSeries with an Ellipse PointMarker.
This displays exactly the graph I want. However, I would like that when the user hovers over a point, the point would highlight and he can see a tooltip showing what is the exact X value and the exact Y value.
Example of what I would like : http://www.highcharts.com/demo/line-basic
Would be even better if when hovering over the line the “nearest” actual point were highlighted with the tooltip.
I have tried a quick search and haven’t come up with the solution yet, note I am new to the library.
Thanks

1 vote
14k views

Hello together,

I have implemented a PaletteProvider which colors the whole Series depending on the Series always the same.

public class OwnPaletteProvider : PaletteProviderBase
{
    private readonly Dictionary<IRenderableSeries, Color> seriesColorsDictionary = new Dictionary<IRenderableSeries, Color>();

    private List<Color> availablesColors = new List<Color>()
    {
        Colors.Red,
        Colors.Yellow,
        Colors.Green,
        Colors.Orange,
        Colors.Blue
    };

    private int counter = 0;

    public override Color? GetColor(IRenderableSeries series, double xValue, double yValue)
    {
        // Get the specific Color for the specific Series
        if (seriesColorsDictionary.ContainsKey(series))
        {
            return seriesColorsDictionary[series];
        }

        // Series doesn't have a color
        // Add new Color from the list for this series in a RoundRobin-way
        var newColorForSeries = availablesColors[counter%availablesColors.Count];
        counter++;

        seriesColorsDictionary.Add(series, newColorForSeries);

        return newColorForSeries;
    }
}

The problem is that I have also in this Series PointMarkers which should have the same Color as the RenderableSeries. I thought, I could create a Style which binds to the Color of the RenderableSeries, but this is not working (see image in attachment).

<Style x:Key="pointMarker" TargetType="{x:Type s:BasePointMarker}">
    <Setter Property="StrokeThickness" Value="5" />
    <Setter Property="Fill" Value="{Binding Path=SeriesColor, 
        RelativeSource={RelativeSource AncestorType={x:Type s:FastLineRenderableSeries}}, Converter={StaticResource StringToBrushConverter}}"/>
    <Setter Property="Background" Value="{Binding Path=SeriesColor, 
        RelativeSource={RelativeSource AncestorType={x:Type s:FastLineRenderableSeries}}, Converter={StaticResource StringToBrushConverter}}"/>
</Style>

I could imagine that the PaletteProvider doesn’t support this. I would need a dynamic coloring of the RenderableSeries and the PointMarkers because the amount of the Series are flexible.

My current solution for this problem is to set the color in the ViewModel, but this seems to me not very nice, because I what to have only Bindings in the ViewModel and the “Styling” and the “Coloring” of the Chart should be done in the Xaml Code with some converters are with the PaletteProvider.

Why questions are:

  • How is it possible to color the FastLineRenderableSeriesor or the XyScatterRenderableSeries dynamically, also when new ones are added or deleted dynamically from the Xaml Code?
  • Can the PaletteProvider have an influence of the Color MarkerPoints?

Best regards,
Martin

PS: Sry I couldn’t use NuGet because the Port 81 is blocked in our company, so you have to add the SciChart library by our own.

1 vote
14k views

Hello,
I’m using your package for price charting. And I need to put on one bar (or candlestick) several markers (for example several dots with different colours and sizes). Also sometimes I need to change size on some of these markers. Now I am doing this by putting CustomAnnotations. Is there a way to plot the same with for example XyScatterRenderableSeries to increase drawing speed?

Best regards,
Roman.

  • Roman asked 9 years ago
  • last active 9 years ago
0 votes
13k views

Is it possible use SciChart to rotate the point markers on chart by a z value? I’d like to produce a chart similar to the attached wind chart sample from the weather underground website.

  • wawr asked 9 years ago
  • last active 9 years ago
0 votes
12k views

paletteProvider transparent colour is not working.

I tried with parseColorToUIntArgb(“#ffffff00”) and parseColorToUIntArgb(“#ffffff00”, 0) to replace the colour with transparent. But its not working.

I want ho hide the marker on the chart if the value is less than a limit. Is any other possibility to hide the marker based on value?
can you check the image, i want to show only the yellow marker.
one more error i am getting from typescript
“Type ‘undefined’ is not assignable to type ‘TPointMarkerArgb'”.

0 votes
12k views

I have a project which need a chart control. i find scichart can meet my most requirements. but i have several questions to be addresssed.
first one is that the point markers must be set depending on Y value of the curve. how do i change the color of point marker?

1 vote
12k views

I have a WPF application where I am using SciChart to display data placed in an XyDataSeries, which is contained in a FastLineRenderableSeries.

I also have a ListView that displays the same data.

I want to place a marker on the data point selected by the user from the ListView. I would like to use the inverted triangle as the marker.

I know how to identify the item in the data series, but how do place a marker on that single point in the data series?

Thanks,
Dave

  • Dave Leach asked 8 years ago
  • last active 8 years ago
1 vote
11k views

Hi

I want to show tooltips on point markers only.
I have FastMountainRenderableSeries with EllipsePointMarker. I don’t want to show tooltip on series, on PointMarker only so can’t use TooltipModifier.

I tried to add tooltip from XAML like this:

<sciChart:EllipsePointMarker sciChart:TooltipModifier.IncludeSeries="True">
    <sciChart:EllipsePointMarker.ToolTip>
        <ToolTip Padding="0">
            ...
        </ToolTip>
    </sciChart:EllipsePointMarker.ToolTip>
</sciChart:EllipsePointMarker>

But it is not showing.

Is it possible to achieve this?

0 votes
11k views

I have some FastLineRenderableSeries that display the user’s real time data.
I let the user set a trigger for a specific line and when the line crosses the trigger value the SciChartSurface freezes.
I would like to add that when this happens, the activated point will be highlighted or mark in a way the user will see exactly where it is…
Is there a simple way to do this?

(the orange line is the trigger…)

0 votes
11k views

I have a class that extends the IPointMetadata interface that I append in my XyDataSeries data. What I would like to do is create a point marker based off this metadata.

For instance, say I have a property called Shape in my metadata that contains values of Circle, Triangle, Star. I want to be able to create those point marker shapes on the same series of data.

I tried creating my own marker by extending the BasePointMarker class, but I wasn’t able to find a way to get to the metadata.

1 vote
10k views

Hi,

I created a custom point marker by deriving from CrossPointMarker and overwriting the DrawInternal function (when I derive from BasePointMaker the behaviour is the same):

   protected override void DrawInternal(IRenderContext2D context, double x, double y, IPen2D pen, IBrush2D brush)
    {
        double xOffset = Width * 0.5;
        double yOffset = Width * 0.5;
        context.DrawLine(pen, new Point(x - xOffset, y - yOffset), new Point(x + xOffset, y + yOffset));
        context.DrawLine(pen, new Point(x + xOffset, y - yOffset), new Point(x - xOffset, y + yOffset));
    }

When I set the PointMarker property of a FastLineRenderableSeries to an instance of this new Type I see the markers on the rendered line, but it does not show up in the legend (just a line with a small gap is drawn).
When I change the code to use a CrossPointMarker the marker is cross displayed on the line and in the legend.
What do I need to do to display the point marker in the legend as well?

Thanks in advance
Peter

0 votes
9k views

hello, i use RolloverModifier on my chart, can i hide Pointmarker?

1 vote
9k views

Hi,

I observed a weird behavior with custom pointmarkers in SciChart. The issue is related to the previous one I reported, so I will not post my code snippets here, because it’s actually the same code as in the link. However, it is a different kind of issue, so I thought I should start a new thread.

Description (I attached a .gif to illustrate the issue):
Inside my RenderSurface, I have some pointmarkers which are filled with a transparent color and others which are filled with the color of the stroke of this pointmarker. Whether or not the pointmarker is filled depends on the IPointMetaData object attached to the point (and the meta data won’t change in any way).
When the chart gets displayed I have 4 pointmarkers visible. All 4 are filled, BUT only the leftmost SHOULD be filled. When I now scroll the chart to the right so that the leftmost pointmarker is not visible anymore the 3 remaining pointmarkers lose their fill and are now displayed as they should. Scrolling the first one back in the get filled again. I can only assume that this is maybe caused by SciChart cacheing some resources internally?

Important: I did only observe this issue with the Direct3D10RenderSurface. Everything works as expected with the other three surface types.

Edit:
seems like the gif animation does not work, so I added two more pictures.

DiaryPointMarker.cs

public class DiaryPointMarker : BasePointMarker
{
    private IList<IPointMetadata> _dataPointMetadata;
    IList<int> _dataPointIndexes = new List<int>();

    private readonly List<Point> _points = new List<Point>();

    public bool UseClustering { get; set; }
    public bool IndicateCommentWithFill { get; set; }

    private IPen2D _lowStrokePen;
    private IPen2D _midStrokePen;
    private IPen2D _highStrokePen;


    private IBrush2D _lowRatingColor;
    private IBrush2D _midRatingColor;
    private IBrush2D _highRatingColor;
    private IBrush2D _noCommentColor;

    public Brush LowRatingColor { get; set; }
    public Brush MidRatingColor { get; set; }
    public Brush HighRatingColor { get; set; }

    public override void BeginBatch(IRenderContext2D context, Color? strokeColor, Color? fillColor)
    {
        _dataPointMetadata = RenderableSeries.DataSeries.Metadata;

        _dataPointIndexes = new List<int>();
        _points.Clear();

        base.BeginBatch(context, strokeColor, fillColor);
    }


    public override void MoveTo(IRenderContext2D context, double x, double y, int index)
    {
        if (IsInBounds(x, y))
        {
            _dataPointIndexes.Add(index);
            _points.Add(new Point(x,y));
        }

        if (UseClustering)
        {
            base.MoveTo(context,x,y,index);
        }
    }

    public override void EndBatch(IRenderContext2D context)
    {
        if (UseClustering)
        {
            base.EndBatch(context);
        }
        else
        {
            Draw(context, _points);
            context.SetPrimitvesCachingEnabled(false);
        }
    }

    public override void Draw(IRenderContext2D context, IEnumerable<Point> centers)
    {
        TryCasheResources(context);

        var markerLocations = centers.ToArray();

        for (int i = 0; i < markerLocations.Length; ++i)
        {
            var diaryMetaInfo = _dataPointMetadata[_dataPointIndexes[i]] as DiaryPointMetaData;

            var center = markerLocations[i];

            var strokePen = diaryMetaInfo.Rating < 60
                ? _lowStrokePen
                : diaryMetaInfo.Rating < 80 ? _midStrokePen : _highStrokePen;
            var fillBrush = diaryMetaInfo.Rating < 60
                ? _lowRatingColor
                : diaryMetaInfo.Rating < 80 ? _midRatingColor : _highRatingColor;

            context.DrawEllipse(
                strokePen,
                IndicateCommentWithFill ? (String.IsNullOrEmpty(diaryMetaInfo.Comment) ? _noCommentColor : fillBrush) : fillBrush,
                center,
                Width,
                Height
                );
        }
    }

    private void TryCasheResources(IRenderContext2D context)
    {
        _lowStrokePen = _lowStrokePen ?? context.CreatePen(LowRatingColor.ExtractColor(), AntiAliasing, (float)StrokeThickness, Opacity);
        _midStrokePen = _midStrokePen ?? context.CreatePen(MidRatingColor.ExtractColor(), AntiAliasing, (float)StrokeThickness, Opacity);
        _highStrokePen = _highStrokePen ?? context.CreatePen(HighRatingColor.ExtractColor(), AntiAliasing, (float)StrokeThickness, Opacity);

        _lowRatingColor = _lowRatingColor ?? context.CreateBrush(LowRatingColor);
        _midRatingColor = _midRatingColor ?? context.CreateBrush(MidRatingColor);
        _highRatingColor = _highRatingColor ?? context.CreateBrush(HighRatingColor);
        _noCommentColor = _noCommentColor ?? context.CreateBrush(Color.FromArgb(0, 0, 0, 0));
    }
}
0 votes
8k views

We have lots of Point Markers in our series that overlap, so we’re trying to find a way to Cluster them in Android and iOS. I can see that there is an SCIPointMarkerClusterizer. Can you give us some pointers on how we can achieve point marker clustering and/or spacing?

0 votes
8k views

Hi,

I’m using RolloverModifier and i want to show only point marker. I don’t want to show tooltip or any info on series. Is it possible?

Tnx.

0 votes
7k views

We have a graph surface with some point markers on it and we want to show a custom tooltip every time the user taps on a point marker. So far I’ve used a UITapGestureRecognizer, convert the touchpoint in the chart frame and for each of the renderable series perform a HitTestAtX with a radius (I’ve tried 1, 5 and 30) but it always returns true, even if I tap on an area where there’s a gap in the chart. Here’s some sample code:

SCIHitTestInfo hitTestInfo = renderableSeries.HitTestProvider.HitTestInterpolateModeAtX(touchPoint.X, touchPoint.Y, 30, renderableSeries.CurrentRenderPassData);

if (hitTestInfo.match)
{
       Console.WriteLine($"Tapped {hitTestInfo.xValue} {hitTestInfo.yValue} with index {hitTestInfo.index} of the series {renderableSeries.DataSeries.SeriesName}");

       var elementSeries = Model.BottomRightLegendList.FirstOrDefault(tup => tup.DataSeries.SeriesName == renderableSeries.DataSeries.SeriesName);

       var element = elementSeries.GraphElement;

       if (element != null)
       {
            matchedElements.Add(element);
       }
}

Why is the “match” property always true, even if there are no Point Markers in the radius?

0 votes
0 answers
7k views

My issue is that the Pointmarker does not draw when I attempt to implement a custom renderable series view model. I’ve isolated it to the fact I am subclassing because the same code will draw if I replace my custom subclass with the base class.

I subclassed XyScatterRenderableSeriesViewModel like so:

public class CustomSeriesViewModel : XyScatterRenderableSeriesViewModel
{
    public CustomSeriesViewModel ()
    : base()
    {
    }
}

It is created like this:

return new CustomSeriesViewModel ()
        {
            // Note: the Pointmarker is created in the Xaml. See styles.
            StyleKey = "CustomSeriesStyle",
            DataSeries = dataSeries,
            IsSelected = true,
        };

And added into a list of type List IRenderableSeriesViewModel

If I replace the line new CustomSeriesViewModel () with new XyScatterRenderableSeriesViewModel(), the Pointmarker is drawn successfully. This is confusing to me, as there’s no other code in the subclass than the constructor, so I would expect it to be substitutable.

The style is responsible for defining the Pointmarker and looks like this:

 <Style x:Key="CustomSeriesStyle" TargetType="s:BaseRenderableSeries" >
    <Setter Property="s:TooltipModifier.TooltipTemplate" Value="{StaticResource CustomTooltipTemplate}" />
    <Setter Property="s:TooltipModifier.TooltipContainerStyle" Value="{StaticResource CustomTooltipStyle}" />
    <Setter Property="PointMarker">
        <Setter.Value>
            <s:SpritePointMarker>
                <s:SpritePointMarker.PointMarkerTemplate>
                    <ControlTemplate>
                        <Grid>
                            <Ellipse Width="13" Height="13" Fill="White"/>
                            <Ellipse Width="9" Height="9" Fill="{StaticResource CustomBrush}"/>
                        </Grid>
                    </ControlTemplate>
                </s:SpritePointMarker.PointMarkerTemplate>
            </s:SpritePointMarker>
        </Setter.Value>
    </Setter>
</Style>
  • John Chow asked 4 years ago
  • last active 4 years ago
0 votes
7k views

Vertical Chart and pointMarker points are ploatted on somewhere on the canvas.

0 votes
7k views

pointMarker max and min values marker are cropped when autoRange is enabled. Check the attached image.

0 votes
0 answers
7k views

Is it possible to show a continuous vertical line as part of Data PointMarker in graph? We have managed to show text labels for our peaks using Data Points and point markers. We have used Sprite to display the TextBlock with peak labels. Now we need to show a vertical line starting from the label text up to the tip of peak. For readability we have kept a vertical space between the data point and the peak label. Hence sometimes it becomes difficult to find which peak points to which peak label. However there is no character to represent a long and continuous line. The OR character shows dotted line. Is there any other control we can use inside the sprite to show as a line?

0 votes
6k views

Notice in the image that the point marker is cut off by the graph border. Is there any way to allow it to extend past the border so in this case it would be a full circle? Thank you!

  • AE Admin asked 7 years ago
  • last active 7 years ago
0 votes
6k views

Hello

Is it possible do detect taps/selection/click over the PointMarkers?

Thanks!

0 votes
0 answers
5k views

Hello

Is it possible do detect taps/selection/click over the PointMarkers?

Thanks!

1 vote
5k views

I have a scatterplot with different series of points and I need to figure out a way to draw each point separately in a different Z order. This will acheive “layering” of the points based on some metadata criteria.

The main issue to solve here is as follows. Each series can have “highlighted” points (outlined in blue on the chart, uses SciChart point selection) and “selected” points (denoted by a star point marker) which are tied to a selection in a grid. Any point in any of the series can be Highlighted and/or Selected. I need the the non-selected and non-highlighted points to be drawn first, then the selected points, then the highlighted points. This would guarantee that the highlighted points are always drawn on top of all others, and the selected points drawn on top of all but the highlighted.

My attempt has been to create a custom chart modifier and override OnParentSurfaceRendered. In that method I build dictionaries of points based on the metadata grouping criteria, then start with the lowest Z index group (the non-highlighted and non-selected points) draw those points, and continue up to the highest Z order group (the highlighted points).

Is there a simpler way to achieve this point layering functionality across data series?

Thanks.

0 votes
4k views

Hi guys,

Is it possible to capture the tap event when we tap on a point marker or a data point? I can see there’s a DataPointSelectionModifier for WPF, but there’s nothing for iOS. Our goal is to show a popup (tooltip) on the point marker when the user taps on it.

Thanks,
Lazar Nikolov

1 vote
2k views

https://www.scichart.com/questions/wpf/allow-point-marker-to-extend-past-graph-border

It is 6 years ago. Is it still not supported?

Extending a graph using GrowBy is not adequate for me because what I need is to draw a point on the border not to extend the graph.

Showing 27 results

Try SciChart Today

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

Start TrialCase Studies