Pre loader

Tag: Annotation

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

0 votes
0 answers
8k views

Hello! I want to create an AxisMarkerAnnotation but the padding doesn’t match the position of the text on the axis – I would like to align it and what is the way to do it? couldn’t find the right settings

0 votes
10k views

When I enter PathAnnotation in the xaml, I get the error “The type ‘s:PathAnnotation’ was not found.” I do have the following Annotation types available:
– AxisMarkerAnnotation
– BoxAnnotation
– CustomAnnotation
– HorizontalLineAnnotation
– LineAnnotation
– LineArrowAnnotation
– SeriesValueAxisMarkerAnnotation
– TextAnnotation
– VerticalLineAnnotation

I want to be able to make a star shape annotation, and PathAnnotation seemed to be the only way to do this. Please let me know if there’s another way to do this.

Thanks,
Rachel

0 votes
9k views

Hi, I need some new type of annotation, for example, TriangleAnnotation or HexagonalAnnotation. I would rather derive the new type from AnnotationBase than from CustomAnnotation, because I need more control points than one. what shall I do?

0 votes
3k views

Hi,

Can you please tell me how to show an annotation(extends at BoxAnnotation(x1, y1, 2, y2)) that starts at a certain point(x1, y1) and ends at the end of the chart. That is, the starting point (x1) is known, and the end point (x2) at the very end of the surface (graph)?
Thanks in advance.

Regards,
Batyr

0 votes
9k views

Hi, guys

Is there something similar like

  • (void)bringSubviewToFront:(UIView *)view;
  • (void)sendSubviewToBack:(UIView *)view;

from UIView but for chart Annotations?

Best regards,
Sushynski Andrei

0 votes
19k views

Hi,
I’ve created a custom annotation and have set it’s .IsEditable property in code so the user can reposition it. I have two issues:
1.I want the user to be able to resize the “PPZLine” in the X direction, but I can’t figure out how to get the anchor points to appear.

  1. I want to be able to see the chart data that the annotation is covering. I tried setting AnnotationCanvas = BelowChart, but then I couldn’t move the annotation or get any annotation mouse handlers to trigger.

Here’s the annoation’s xaml:

<s:CustomAnnotation x:Class="CinchV2DemoWPF.Views.SciChart.PPZView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:CinchV2="clr-namespace:Cinch;assembly=Cinch.WPF"
             xmlns:meffed="clr-namespace:MEFedMVVM.ViewModelLocator;assembly=MEFedMVVM.WPF"
             xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:s="clr-namespace:Abt.Controls.SciChart;assembly=Abt.Controls.SciChart.Wpf" 
             meffed:ViewModelLocator.ViewModel="PPZViewModel"

             X1="{Binding X1}"
             Y1="{Binding Y1}"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

    <!-- price line must use margin 0,0 or obj will not be visible-->
        <s:BoxAnnotation Name="LongEntryMarker" Grid.Row="0"
                       Width="20"    Height="10"  Background="DarkViolet" Margin="0,0"  VerticalAlignment="Top" 
                         HorizontalAlignment="Right"
                         >
        </s:BoxAnnotation>

        <!-- long marker line MouseRightButtonDown="LongEntryMarker_OnMouseRightButtonDown"-->
        <s:BoxAnnotation Name="PPZLine" Grid.Row="1"
                       Width="150"    Height="5"  Background="red" Margin="0,0"  VerticalAlignment="Top" 
                         >
        </s:BoxAnnotation>
</Grid>
</s:CustomAnnotation>
  • tecman234 asked 11 years ago
  • last active 9 years ago
0 votes
7k views

There is a problem with annotation drag listeners. OnDragEnded and in fact also OnDragStarted are called all the time (just like onDragDelta) instead of only on those particular events

Steps to reproduce
just add a listener to annotation (in my case CustomAnnotation)

.withAnnotationDragListener(object : OnAnnotationDragListener {
            override fun onDragDelta(annotation: IAnnotation, x: Float, y: Float) {
                //whatever
            }

            override fun onDragStarted(p0: IAnnotation?) {
                "onDRAGSTARTED".log()
            }
            override fun onDragEnded(p0: IAnnotation?) {
                "ONDRAGENDED".log()
            }
        })

Is there a solution?

0 votes
14k views

I’m currently trying to adapt an example to post here as an example repro– But in the meantime I figured I’d post and see if there are any fundamental problems with trying to do this.

The exception message states:

Additional information: Cannot get data-value from coordinate as the associated Axis is null
0 votes
7k views
 var annotationMax = new HorizontalLineAnnotation () {
                            Stroke = new SolidColorBrush (Colors.DarkRed),
                            HorizontalAlignment = System.Windows.HorizontalAlignment.Center,
                            Y1 = item.MaxBandwith,
                            Y2 = item.MaxBandwith,
                            X1 = item.FromWavelength,
                            X2 = item.ToWavelength,
                        };
                        var label = annotationMax.AddLabel ();

after last line label is null
???

0 votes
20k views

Hi

I don’t understand how to disable dragging an annotation with mouse. I didn’t find anything in your documentation.

I have a simple annotation as follows:

                                <s:HorizontalLineAnnotation x:Name="line" IsEditable="False" IsManipulationEnabled="False"  IsAttached="True" Y1="2020" ShowLabel="True" LabelValue="" LabelPlacement="TopRight" Stroke="Red"/>

tried with IsEditable=”False” IsManipulationEnabled=”False” IsAttached=”True” but nothing seems to work.

Could you please help me ?
thank you

  • lorenzo522 asked 8 years ago
  • last active 8 years ago
Showing 51 - 60 of 60 results