Pre loader

1

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
In reply to: Line Graph Names

Hi Aditya,

Well there are several possible ways to do this:
– You can set AxisTitle for YAxis in each EEG channel
– You can use Annotation API and place TextAnnotation with channel name inside each EEG chart

Is this suitable for your needs?

Best regards,
Yura

0 votes

Hi Divya,

At present we do not have a 3D chart control. The SciChart3D DLL contains the DirectX render surface (D3D10RenderSurface) which is used to hardware-accelerate the 2D chart.

We are actively working on a 3D chart control and have a prototype in-house. As soon as we have something release worthy, we will announce it.

If you want to contact me directly and give me your requirements I would appreciate it.

Best regards,
Andrew

0 votes

Hi Alexander,

I believe this issue is caused by TabControl, which utilizes virtualization of its content by default. When a tab with a chart on it gets invisible, the SciChartSurface gets unloaded by the TabControl and becomes inactive. When you switch tabs again on button click, the SciChartSurface isn’t loaded at that moment so it cannot perform ZoomExtents.

I think if you delay the call to ZoomExtents using Timer it will work just fine.

Best regards,
Yuriy

1 vote

There’s no easy way to do this other than ‘Foreach annotation in Annotations where YAxisId = …’.

I was going to suggest a default style, but since AnnotationBase.YAxis is not a dependency property you can’t bind AnnotationBase.IsHidden directly to YAxis.Visibility.

Maybe you could do it with an element name binding from AnnotationBase.IsHidden to YAxis.Visibility but it wouldn’t be clean or easy. I think stick with what you have!

1 vote

Jim’s approach of enabling mouse events on the svg and handling it directly on the svg is probably the easiest, as this is rather outside the scope of scichart. However, there might be a way to use scichart apis to achieve this:

Annotations have an onDragStarted method called on mouseDown, which they use to determine which dragging point (if any) was selected. You would need to implement your own hitTest logic to work out which node within your svg is selected. There is then a calcDragDistance method which is called on mouseMove. This tracks the previous point to determine how far the mouse has moved and updates the annotation accordingly.

You can also override the svgStringAdornerTemplate function which returns the svg that draws the selection box and drag handles. This could be made to show selection UI only for the selected node.

Regards
David

0 votes

Hi Tobias,

Thank you for the advice.
You can make a new feature request if you wish to see these changes in our future releases and let people vote for it. Here is how to do this:
https://www.youtube.com/watch?v=cWa6bRCCAFE

0 votes

Hi,

Don’t know if this one is still actual, but the issue appears because of bindings late update. If it is needed to correct data immediately in constructor of the control, it can be moved to SomeMethod and invoked in constructor with Task.Factory.StartNew(new Action(() => Dispatcher.BeginInvoke(new Action(SomeMethod)))), so that it is performed after all other interim tasks on UiThread.

Please, refer to the attached code-behind file from the sample.

Best regards,
Yuriy

0 votes

Hi there,

We’ve created an example to demonstrate how to add a selection rectangle onto a chart using SciChart.js

The full example can be fetched from our GitHub repository.

enter image description here

How it works:

We’ve used the ChartModifierBase API (see ChartModifier documentation) to create a custom modifier – a behaviour which can be added to the chart. This listens to mouseDown, mouseMove and mouseUp events and places an Annotation (see Annotations Documentation) onto the chart.

When the user clicks mouseDown on the chart, we add a selection rectangle to the chart. When the user moves the mouse, the selection rectangle size and position is updated.

Nothing happens when the selection ends, the annotation disappears, but you can change the code to get the behaviour you want.

Note this example uses JavaScript but also TypeScript for the declaration of the custom modifier. perhaps the same thing could be achieved with JavaScript ES6 as well.

Does this help? Let me know if you require anything else!

Best regards,
Andrew

1 vote

Hi there,

You should use attached property MouseManager.MouseEventGroup=”MyGroup”, not this one which is exposed by modifiers – it is for internal usage.

Hope this helps!

Best regards,
Yuriy

0 votes

Hi Marek,

Are you using the Direct3D10RenderSurface in your charts? Parallels is virtualization hardware and emulates DirectX10 using OpenGL on a Mac. It is possible that this combination cannot be supported correctly.

Let me know some more information and we can correctly diagnose.

Best regards,
Andrew

0 votes

Hi Chinghung. Thank you for sharing this example. We’ve investigated the issue and found the cause of the problem.

The xValues and yValues must be (number[] or Float64Array)
You need to replace xValues, yValues with the correct type:

const xValues = Array.from({length: 100}, (x,i) => i); (for your case, from provided example)

If you want to custom axis labels, please, use the LabelProvider:

https://www.scichart.com/documentation/js/current/webframe.html#Axis%20Label%20Formatting%20-%20LabelProvider%20API.html

0 votes

Hi Will,

I’m glad to inform you that we’ve prepared a sample project showing how 3D objects can be dynamically added to the SciChart 3D Surface. Please find it attached.

Please let us know if this helps.

With best regards,
Lex
SciChart Technical Support Engineer

  • Lex answered 12 months ago
0 votes

Hi Andreas,

Yes, you are right. I meant the StrokeThickness property, not Width. Updated my previous post.

Concerning the default color, you can bind to it using our ThemeBinding extension:

<Setter Property="Stroke" Value="{s:ThemeBinding RolloverLineStroke}" />

As to the issue with hitting a point, I’m not sure I understand what you mean. Please attach a video or a sample where we can see the changed behavior vs old one.

Best regards,
Yuriy

0 votes

on scrool and data update use

[xAxis setVisibleRange:[[SCIDoubleRange alloc] initWithMin:SCIGeneric(visibleRangeMin + (isLeft ? barCount : -barCount))
Max:SCIGeneric(visibleRangeMax + (isLeft ? barCount : -barCount))]]

I will try to create small example

thanks

0 votes
In reply to: Modifier Surface bug?

Hi Miles,

Are you aware of WPF Snoop? A tool for inspecting the visual tree and debugging WPF applications? I’ve attached a screenshot to show me snooping SciChart to determine the bounds of the parent surface.

As you can see the SciChartSurface extents to the bounds of the user control and there is a padding inside of 20,20,15,15. This means the mouse leave event won’t fire so long as the mouse is within that red highlighted area.

To work around this, you can do the following. In your Xaml declare a border and place the SciChartSurface inside it with a padding of zero, and margin of 20,20,15,15

<Border Background="#333">
   <s:SciChartSurface Padding="0" Margin="20,20,15,15">
       <!-- etc ... -->
   </s:SciChartSurface>
</Border>

This will have the effect of making the 20 pixel border outside of the parent surface so when the mouse moves into this region, OnParentSurfaceMouseLeave will correctly fire.

If on the other hand you want to know if the mouse is inside the chart grid area, or either axis, you can use some aspects of the hit-test API to do this.

Please see this forum post, specifically the “HitTestModifier” which demonstrates where a mouse click is.

http://http://www.scichart.com/questions/question/rubberbandxyzoommodifier-onmodifiermousedown/

Best regards,

2 votes

Hi kewur,

Thank you for your inquiry. To place the labels on the left side of the axis you need to set AxisAlignment = Left, and BorderThikness of the Axis, like below:

<s:NumericAxis AxisAlignment="Left" BorderThickness="0,0,1,0" ...

Hope it hepls.

Best regards,
Nazar

0 votes

Hi Robin,

Thank you for the example and reporting! We’ll fix this bug for the next update. I would suggest you binding the SciChartSurface.ChartModifier property instead and working with ModifierGroup.ChildModifiers collection in the ViewModel directly, it seems to be more convenient way to do things(and the reason why it wasn’t reported before). Does this make sense for you?

Best regards,
Yuriy

0 votes

Hi Bernd

It’s as simple as

 double yMax = double.MinValue; 
 int indexMax = -1;
 IList<double> yValues = DataSeries.YValues as IList<double>
 for(int i = 0; i < DataSeries.Count; i++)
 {
      double yCurrent = yValues[i];
      if (yCurrent > yMax) 
      {
            yMax = yCurrent; 
           indexMax = i;
      }
 }

 double xMax = (double)DataSeries.XValues[indexMax];

Best regards,
Andrew

0 votes
In reply to: Memory usage

Hello again!

I’ve modified my project to run faster. I’ve put BackgroundImageAnnotation, from which we create sprite, outside the function. But when I run the application, the image freezes and doesn’t redraw.

What is the reason? And how can I fix it?

I’ve attached modified project below.

Link: https://yadi.sk/d/TSsZuDTbipP7y

  • Egor answered 9 years ago
  • last active 9 years ago
Showing 21 - 40 of 6k results