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

Hello,

I want to implement a custom deltaX cursor in my software. It consists in two vertical lines that can be moved be the user and the idea to get the delta x (DateTime) between the two lines.
I’ve started to implement it by using two custom VerticalLineAnnotation added to a VerticalSliceManager. As my chart is a real time chart, I don’t want my cursors postions changed exepct on user interaction, that’s why I set to Relative the CoordinateMode property of my two Annotations.
The display and the interaction works fine, but when I try to retrieve the actual position of one cursor to compute the delta I have some trouble to convert the relative position to a DateTime value.
I have override the OnDragDelta() method, the relative value of X1 is correct but when I try to convert it into a DateTime by using FromRelativeCoordinate, I still have Date in 1899. I also try to interpret this as OA Date but I still have wrong date.

Do you have an idea ?
Thanks

 public override void OnDragDelta()
    {
        if (_sciChartSurface.XAxis != null)
        {
            double dataValue = (double)this.FromRelativeCoordinate((double)this.X1, _sciChartSurface.XAxis);
            DateTime classic = new DateTime((long)dataValue);
            DateTime fromOa = DateTime.FromOADate(dataValue);
            Debug.WriteLine("CLASSIC "+ classic);
            Debug.WriteLine("OA "+ fromOa);
        }
    }
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

1 vote
0 answers
14k views

Hi,

I have annotation, users can it drag and drop. But for it first need select this annotation and after drag it(with re-touching).
How to immediately drag annotation(without re-touching)?

Thanks in advance.

Regards,
Batyr

0 votes
11k views

I have an issue with the latest version of Scichart. I have a chart which we are exporting to an image after cloning. We are using the CreateCloneOfSurfaceInMemory API call to take the clone. The problem is that, the annotations are getting lost from the cloned surface. I spent some time debugging and found that this is getting lost when we have VerticalSliceModifier in the Modifier group. I have attached the SciChart_CreateAnnotationsDynamically example which is modified to replicate this issue.

0 votes
6k views

Hello,

I have two questions about how to get axes or annotations by ID.

First, I trying to update the VisibleRange for X axis in the internalUpdate function in the UniformHeatmapSeriesTooltip. When I use getAxisById, my ECG data series is gone from the chart. But it works if I use getDefault() instead (axis Id not defined). So I kind of confused.

private class CustomHeatmapTooltip extends UniformHeatmapSeriesTooltip {

        public CustomHeatmapTooltip(Context context, UniformHeatmapSeriesInfo heatmapInfo) {
            super(context, heatmapInfo);
        }
        @Override
        protected void internalUpdate(UniformHeatmapSeriesInfo heatmapInfo) {
            ecgSurface.getXAxes().getAxisById("ecgx").setVisibleRange(new DateRange(startDate, stopDate));
        }
}

Second, I have one vertical line annotation and multiple text annotations. Every time I render the heatmap, I want to remove the text annotations and add some new text annotations as needed, without touching the vertical line annotation. Is there a way to only remove the text annotations?

Thanks a lot.

  • Gang Xu asked 4 years ago
  • last active 4 years ago
0 votes
0 answers
9k views

Hi
Sometimes when I call annotation.setIsHidden in a surface with RenderSurfaceGl, not works.
what should I do?

0 votes
11k views

How to get current Y value of annotation in code behind?

enter image description here

1 vote
12k views

Hello,

I have a scichart and bound to its VM class. Inside this VM there is a Highlights property.

On the MainWindow, I am placing two of this charts with their own VM instance.

The problem is that when the Annotations is bound, it is only drawn on the last chart as shown in the image.

If I manually code in xaml the annotations (no binding) then the annotations are drawn in both charts.

How can I make it work with the binding?

Thanks

  • Miguel Hau asked 10 years ago
  • last active 10 years ago
0 votes
12k views

To whom this may concern:

I’m having a slight issue (bug, possibly?) with custom annotations. I have created a custom annotation with an image (XAML shown below)

<s:CustomAnnotation x:Class="Dashboard.SciChartCustomComponents.CustomAnnotations.MicrostructureAnnotation"
                    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:s="http://schemas.abtsoftware.co.uk/scichart"
                    xmlns:local="clr-namespace:Dashboard.SciChartCustomComponents.CustomAnnotations"
                    mc:Ignorable="d">

    <Border BorderBrush="White" BorderThickness="2" Background="Black">
        <StackPanel>
            <Image x:Name="annotationImage" Stretch="None" Width="150" Height="100" Visibility="Collapsed"/>
            <TextBlock x:Name="annotationText" HorizontalAlignment="Center"/>
            <TextBlock x:Name="parameterText" HorizontalAlignment="Center" Visibility="Collapsed"/>
        </StackPanel>
    </Border>

</s:CustomAnnotation>

The image is applied with the following code (note the anchor points are bottom-right):

var annotation = new MicrostructureAnnotation
{
    HorizontalAnchorPoint = HorizontalAnchorPoint.Right,
    VerticalAnchorPoint = VerticalAnchorPoint.Bottom,
    IsEditable = true,
    X1 = xValue, // Both Obtained from hitpoint X- and Y-Values
    Y1 = yValue
};

annotation.annotationImage.Source = // some image Uri
annotation.annotationText.Text = // some text
annotation.parameterText.Text = // some other text

So this successfully shows the annotation as i liked, shown in 1.png.

Now I have a function that collapses the visibility of the image, which yields an annotation that is removed from its anchor point (although the top-left location remains the same), shown in 2.png.

If I try to move the annotation after removing the image, the anchor point is in the location of where the top-left anchor should be when the image collapses but the image is still in the wrong location, shown in 3.png.

When I finally do move the annotation, the annotation moves away from the cursor to the top-left anchor point, shown in 4.png.

Again i’m not sure if this is a bug, but could someone please advise?

Thanks kindly!

— Ari

Edit: I don’t have this problem when setting the anchor points to top-left.

  • Ari Sagiv asked 8 years ago
  • last active 8 years ago
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