SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
11 views

I am working on the spectrogram (heatmap) that can be interacted with fingers. It can only pan horizontally, and the Z values from heatmap will be updated whenever panning stopped.

I override onUp function from ZoomPanModifier to fetch the latest x range, which is temporarily logged by VisiableRangeChangeListener. But the issue is, when I’m panning with the finger horizontally, the chart will always be moving a little bit after onUp() occurred. So there’s a difference between the desired x range and actual x range.

Is there a way to get the final x range after a panning action?

Thanks.

  • Gang Xu asked 22 hours ago
  • last active 5 hours ago
0 votes
0 answers
4 views

hello

I have a list box where each item is a chart, if I put the chart seperately from this list box the rubberband zoom works fine, but the same chart in the list box item cannot zoom (does not show rubberband)

Could you please advise?

Thanks

0 votes
0 answers
7 views

Is it possible to define custom extents such that when I call ChartSurface.ZoomExtents() it will zoom out to where I want instead of the default found by the chart?

I have a requirement that dictates the amount of padding around each axis. I use a custom ViewPortManager and override the OnCalculateNewYRange() and OnCalculateNewXRange() functions to set the range.

I use the ZoomState to decide whether to allow zoom to do its job versus my dictation of the range when the zoom has been to extents. This unfortunately shows an awkward bump between the 3 states.

  1. Zoomed
  2. Zoomed to extents
  3. Zoomed to my custom range

Between 2 and 3 there is a “bump” as the chart resizes. Imagine the user double clicks to ZoomExtents and the animation from zoomed goes out to extents and then suddenly does the same from extents to my custom range. It’s really awkward and I don’t want to lose the animation as it’s a very nice user experience instead of an abrupt switch from zoomed to extents.

So, it would be great to set the extents in my derived ViewPortManager such that a ZoomExtents zooms directly to my custom extents instead of the default.

0 votes
28 views

Hi
I am creating an real-time application that handles multiple series in one surface. The series number is variant from 2 to 10. I use “RenderableSeries” then bind it to ObservableCollection. But I can not update DataSeries during run time and it throw an error? is it possible at all?
Thanks

  • neda asked 2 days ago
  • last active 1 day ago
0 votes
0 answers
28 views

I have a question about the font of the label text. When the screen is captured and enlarged, the character has an outline border. Is there a way to get rid of this border? Japanese Kanji font is used.
Thank you.

var yAxisLeft = new SCINumericAxis();
yAxisLeft.AxisTitle = syAxLeft;
yAxisLeft.AxisId = "Primary Y-Axis";
yAxisLeft.AxisAlignment = SCIAxisAlignment.Left;
yAxisLeft.TitleStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.TickLabelStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.DrawMajorBands = false;
yAxisLeft.DrawMinorGridLines = false;
0 votes
47 views

Hi,

I would like to ask whether it is possible to reduce the default margins around the 3D plane cube on 3D plots? I realize that I can change it by relocating the camera and with ZoomModifier but, once the ZoomExtents() is called, the margins are restored back. I attached here a screenshot with the green line showing the margin area that I mean.

Thank you in advance!

  • corvex asked 4 days ago
  • last active 2 days ago
0 votes
0 answers
37 views

When I add CursorModifier programmatically on long tap I have to remove my finger from screen and press it again In order to CursorModifier become visible

Is it possible to do the following?


1) scroll chart horizontally

2) long tap on screen

3) add CursorModifier programmatically and show it immediately

4) move CursorModifier(finger is still touching the screen)

5) remove finger from screen and remove CursorModifier so I can scroll again

Thank you for reply in advance!

0 votes
45 views

Hi,

I’m actually working on new wpf application using Scichart and I’m wondering how to plot only XAxis and YAxis without labels and without gridlines.

Here is my code, I cannot not figure out what is missing to do that:

            <s:SciChartSurface.YAxis>
                <s:NumericAxis VisibleRange="{Binding ...}"
                               MajorGridLineStyle="{Binding ...}"
                               TickLabelStyle="{Binding ...}"
                               MajorDelta="{Binding ...}"
                               MinorDelta="1"
                               AutoTicks="False"
                               AxisAlignment="Left"
                               DrawMajorGridLines="false
                               DrawMinorGridLines="false"
                               DrawMajorBands="false"
                               DrawMajorTicks="false"
                               DrawMinorTicks="false"
                               DrawLabels="false"
            </s:SciChartSurface.YAxis>


        <Style x:Key="NoGraphGridLineStyle" TargetType="s:NumericAxis">
            <Setter Property="Visibility" Value="Collapsed" />
        </Style>
0 votes
54 views

I’ve verified it steps thru the code as I would expect; however, it only ever zooms in further. The intent of this modifier is to only zoom out when the mouse is dragged up and left. I.e.

Mouse down
Drag up/left
Mouse up

    class ZoomOutModifier : ZoomExtentsModifier
{
    double _x;
    double _y;
    MouseButtons _button = MouseButtons.None;

    public override void OnModifierDoubleClick(ModifierMouseArgs e)
    {
        // do not zoom to extents on a double click
        e.Handled = true;
    }

    public override void OnModifierMouseDown(ModifierMouseArgs e)
    {
        base.OnModifierMouseDown(e);

        // where was the mouse button on the chart surface?            
        _x = e.MousePoint.X;
        _y = e.MousePoint.Y;

        // which button was clicked?  we're only going to zoom 
        // out on a left button click.
        _button = e.MouseButtons;
    }

    public override void OnModifierMouseUp(ModifierMouseArgs e)
    {            
        // are we left and up from where the mouse was clicked?
        if (MouseButtons.Left == _button &&
            e.MousePoint.X < _x &&
            e.MousePoint.Y < _y)
        {
            using (var updater = ParentSurface.SuspendUpdates())
            {
                ParentSurface.ZoomExtents();
                ParentSurface.ResumeUpdates(updater);
            }

            e.Handled = true;
        }
        else
            base.OnModifierMouseUp(e);
    }
}
0 votes
67 views

Is it possible to set different color to axis ticks and axis title.
In 2D-Chart i did it by changing the style of DefaultTickLabel:

<Style x:Key="NumericAxisForMvvm" TargetType="axis:NumericAxisForMvvm">

  <Setter Property="FontSize" Value="12" />
  <Setter Property="FontFamily" Value="Arial" />
  <Setter Property="FontWeight" Value="Bold" />
  <Setter Property="TickTextBrush" Value="Red" />

  <Setter Property="TickLabelStyle">
    <Setter.Value>
      <Style TargetType="s:DefaultTickLabel">

        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontFamily" Value="Courier New" />
        <Setter Property="Foreground" Value="Blue" />

        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="s:DefaultTickLabel">
              <ContentControl Content="{Binding}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              IsTabStop="False" 
                              Foreground="{TemplateBinding Foreground}" 
                              FontFamily="{TemplateBinding FontFamily}"
                              FontSize="{TemplateBinding FontSize}"
                              FontWeight="{TemplateBinding FontWeight}"/>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </Setter.Value>
  </Setter>
</Style>

Same procedure seems doesn’t work for 3D-Charts.
How can i achieve this?
Is that currently possible?

Best Regards
Silvester

0 votes
58 views

Hi,

I was using android sdk 2.5 and i’m not getting any runtime errors and error logs. But after updating the project to sdk 3.0 i started getting errors (no code has been changed). During the runtime, chart’s xAxis shows wrong times and started writing 1970 under every vertical grid line. Also debug log says: “SciChartSurface has no XAxes. Please ensure SciChartSurface.XAxis is set, or SciChartSurface.XAxes has at least one axis”.

I’m just upgrade sdk 2.5 to 3.0, how can i fix errors?

Tnx.

0 votes
63 views

Hello,

Would it be possible to receive some information on how to take the legend outside of the chart surface area? We are having an issue when the user selects more axis’ to be shown in the chart. The chart then shrinks horizontally making the legend difficult to access for removing the axis’.

A quick how to with some code example would be highly appreciated. To further highlight, this is Xamarin.iOS project we are talking about.

Thank you and have a nice day.

Best Regards

0 votes
0 answers
69 views

I create a real time chart and want to add line annotation which help to user to understand chart wave form.
However I can’t add fix position of annotation. I change annotation every time chart is update but the annotation is not fixed in one position. The x value is datetime axis and the visible range is 5 second. Data is added around 100 data per second.

0 votes
88 views

SciChart Android
I only want to draw line chart which update real time. So, I don’t want label and grid. I remove the label and grid via scichart builder options but the chart remain little spacing for label. How to remove these spacing.
Android Version – 7.0
SciChart Version – 2.5.0.2610

My Code –

XAxis = sciChartBuilder.newDateAxis()
                .withDrawLabels(false)
                .withDrawMajorGridLines(false)
                .withDrawMajorBands(false)
                .withDrawMinorGridLines(false)
                .withVisibleRange(current, graphEnd)
                .withAutoRangeMode(AutoRange.Never)
                .build();


    YAxis = sciChartBuilder.newNumericAxis()
            .withDrawLabels(false)
            .withDrawMajorGridLines(false)
            .withDrawMajorBands(false)
            .withDrawMinorGridLines(false)
            .withVisibleRange(-MaxY , MaxY)
            .withAutoRangeMode(AutoRange.Never)
            .build();

    ModifierGroup chartModifiers = sciChartBuilder.newModifierGroup()
            .withZoomPanModifier().withXyDirection(Direction2D.XDirection).withZoomExtentsY(false).build()
            .build();
0 votes
0 answers
65 views

I looked at this thread but it doesn’t help me.

https://www.scichart.com/questions/wpf/dynamically-clearing-legends-from-the-legendmodifier

I have problem where an item is still shown in the legend even though no series is currently displayed on the chart.

For example.

  1. The SciChart RenderableSeries dependency property of my chart surface is a property in my view model named “Measurements”, I.e. ObservableCollection of IRenderableSeries.
  2. An ObservableCollection of another class named “ExampleList” is also in my view model.
  3. In a data grid elsewhere in the application a user selects 3 rows. The “ExampleList” collection now has 3 items in it. Part of the setter for that property is to call “Measurements.Clear()” and then follow that with a “Measurement.Add(newseries)” 3 times.
  4. When a user selects an individual item in the data grid that contains no points that could be displayed on the chart I only call “Measurements.Clear()” and I don’t subsequently called “Measurements.Add()”

My issue is that the legend never clears and shows the last series that was selected before selecting this new item which shouldn’t even be in the chart. It’s behaving as if the chart were not cleared; although I have verified that I definitely am calling “Measurements.Clear()”

0 votes
0 answers
53 views

I want to change the colors of the individual columns of a UniformGridDataSeries3D by applying a PaletteProvider to the RenderableSeries. I’m trying to set the PaletteProvider of a ColumnRenderableSeries3DViewModel with UniformGridDataSeries3D as DataSeries to MyPaletteProvider (see bellow, currently only returning blue) but i get the following exception when the graph is rendering:

SciChart3DSurface didn’t render, because an exception was thrown:
Message: Index was outside the bounds of the array.

Stack Trace: at SciChart.Charting3D.RenderableSeries.ColumnUniformGridSceneEntityHelper.GetPoints3DData(ColumnRenderableSeries3D renderableSeries, IPointSeries3D pointSeries, IRenderPassInfo3D rpi, Point3DXyzData& data)
at SciChart.Charting3D.RenderableSeries.BaseRenderableSeriesSceneEntity3D`3.UpdateScene(IRenderPassInfo3D rpi)
at SciChart.Charting3D.Primitives.BaseSceneEntity1.Update()
at SciChart.Charting3D.Primitives.BaseSceneEntity1.Update(Single fDeltaTime)
at SciChart.Charting3D.Interop.SCRTSceneEntity.SwigDirectorUpdate(Single _fDeltaTime)
at SciChart.Charting3D.Interop.VXccelEngine3DPINVOKE.SCRTSceneEntity_UpdateSwigExplicitSCRTSceneEntity(HandleRef jarg1, Single jarg2)
at SciChart.Charting3D.Interop.SCRTSceneEntity.Update(Single _fDeltaTime)
at SciChart.Charting3D.Primitives.BaseSceneEntity1.Update(Single fDeltaTime)
at SciChart.Charting3D.Interop.SCRTSceneEntity.SwigDirectorUpdate(Single _fDeltaTime)
at SciChart.Charting3D.Interop.VXccelEngine3DPINVOKE.SCRTCallbacks_OnUpdate(HandleRef jarg1, Single jarg2)
at SciChart.Charting3D.Interop.SCRTCallbacks.OnUpdate(Single _fDeltaTime)
at SciChart.Charting3D.Viewport3D.DrawFrameInternal(ISceneDescriptor sceneDescriptor)
at SciChart.Charting3D.Viewport3D.FillSource(ISceneDescriptor sceneDescriptor)
at SciChart.Charting3D.Viewport3D.DrawFrame(IRenderPassInfo3D rpi)
at SciChart.Charting3D.SciChart3DRenderer.RenderLoop()
at SciChart.Charting3D.SciChart3DSurface.DoDrawingLoop()

public class MyPaletteProvider : IFillPaletteProvider3D
    {
        public void OnAttach(IRenderableSeries3D renderSeries)
        {

        }

        public void OnDetached()
        {

        }

        public Color? OverrideFillColor(IRenderableSeries3D series, int index, IPointMetadata3D metadata)
        {
            return Colors.Blue;
        }
    }  
0 votes
80 views

Hi,
I want to know how to set FastBandRenderableSeries withSeriesInfoProvider to null?

If i set null like sciChartBuilder.newBandSeries().withSeriesInfoProvider(null) i’m getting error on debug logs:

E/Exception: null
java.lang.NullPointerException: Attempt to invoke interface method ‘com.scichart.charting.visuals.renderableSeries.tooltips.ISeriesTooltip com.scichart.charting.visuals.renderableSeries.hitTest.ISeriesInfoProvider.getSeriesTooltip(java.lang.Class)’ on a null object reference
at com.scichart.charting.modifiers.behaviors.TooltipBehaviorBase.func(SourceFile:120)
at com.scichart.charting.modifiers.behaviors.TooltipBehaviorBase.func(SourceFile:35)
at com.scichart.core.utility.ListUtil.select(SourceFile:249)
at com.scichart.core.observable.ProjectionCollection.onCollectionChanged(SourceFile:186)
at com.scichart.core.observable.ObservableCollection.a(SourceFile:302)
at com.scichart.core.observable.ObservableCollection.a(SourceFile:79)
at com.scichart.core.observable.ObservableCollection.add(SourceFile:93)
at java.util.Collections.addAll(Collections.java:5447)
at com.ikon.prodigy.Fragments.FragmentUI.SciChartFragmentUI$1$3.run(SciChartFragmentUI.java:1057)
at com.scichart.core.framework.UpdateSuspender.using(SourceFile:122)
at com.ikon.prodigy.Fragments.FragmentUI.SciChartFragmentUI$1.run(SciChartFragmentUI.java:1013)
at android.os.Handler.handleCallback(Handler.java:793)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:173)
at android.app.ActivityThread.main(ActivityThread.java:6698)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)

0 votes
78 views

Hello,

I just enabled the new high precision ticks on LogarithmicNumericAxis feature.
The two screenshots show the same data once with high precision ticks disabled and once with high precision ticks enabled.

Is it possible to get the typical loagithmic scaling of the ticks like in the screenshot with high precision ticks disabled ?

Best regards
Benjamin

0 votes
69 views

Hello, I am trying to use the default DataPointSelectionModifier on a line chart with a DataSeries of type XyDataSeries<‘DateTime, double’> as in the example suite HERE . It seems to work fine out of the box if the DataSeries is of type XyDataSeries<‘double, double’>. Am I missing something as to why this modifier is not working with the former data type?

Relevent code is:

CustomChart.xaml:

<sci:SciChartSurface x:Name="customChart"
                         Grid.Column="0">
        <sci:SciChartSurface.RenderableSeries>

            <sci:FastLineRenderableSeries Name="lineRenderableSeries"
                                          Stroke="#4AB748"
                                          StrokeThickness="1">
                <sci:FastLineRenderableSeries.PointMarker>
                    <sci:EllipsePointMarker Fill="#138A43" />
                </sci:FastLineRenderableSeries.PointMarker>
                <sci:FastLineRenderableSeries.SelectedPointMarker>
                    <sci:EllipsePointMarker Fill="#C4ECA0"
                                            Width="12"
                                            Height="12" />
                </sci:FastLineRenderableSeries.SelectedPointMarker>
            </sci:FastLineRenderableSeries>
        </sci:SciChartSurface.RenderableSeries>

        <!--  Create an X Axis with GrowBy  -->
        <sci:SciChartSurface.XAxes>
            <sci:CategoryDateTimeAxis DrawMajorBands="True"
                                      GrowBy="0.1, 0.1"
                                      AxisAlignment="Bottom" />
        </sci:SciChartSurface.XAxes>

        <!--  Create a Y Axis with GrowBy.-->
        <sci:SciChartSurface.YAxis>
            <sci:NumericAxis DrawMajorBands="False"
                             GrowBy="0.5, 0.5"
                             CursorTextFormatting="$0.00"
                             TextFormatting="$0.00" />
        </sci:SciChartSurface.YAxis>

        <!-- Setting IsEnabled enables or disables a modifier in the Toolbar -->
        <sci:SciChartSurface.ChartModifier>
            <sci:ModifierGroup>

                <sci:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                                                IsEnabled="True"
                                                SelectionFill="#B1B5B2B2"
                                                SelectionStroke="#009E9C9C" />
            </sci:ModifierGroup>
        </sci:SciChartSurface.ChartModifier>


    </sci:SciChartSurface>

CustomChart.xaml.cs:

private void OnDataSeriesChanged(DependencyPropertyChangedEventArgs e)
    {
      var inputDataSeries = e.NewValue as XyDataSeries<DateTime, double>;

        var dataSeries = new XyDataSeries<DateTime, double>();

        dataSeries.Append(inputDataSeries.XValues, inputDataSeries.YValues, dataSeries.YValues.Select((x) => new MyMetadata { IsSelected = false }));

        lineRenderableSeries.DataSeries = dataSeries;

    }

MyMetaData.cs:

public class MyMetadata : IPointMetadata
{
    public event PropertyChangedEventHandler PropertyChanged;
    public bool IsSelected { get; set; }
}

With this implementation I am able to individually select datapoints and select multiple datapoints with ctrl/shift but am unable to drag select multiple datapoints.

If, as in the example suite, I change the default XAxis to:

<sci:SciChartSurface.XAxis>
            <sci:NumericAxis 
                             DrawMajorBands="True"
                             GrowBy="0.1, 0.1"
                             CursorTextFormatting="0" />
        </sci:SciChartSurface.XAxis>-->

and of course change all the relevant datatypes in CustomChart.xaml.cs from XyDataSeries<‘DateTime, double’> to XyDataSeries<‘double, double’> everything behaves as expected.

Am I missing something to make the DragSelection work out of the box with the former data type without having to make a custom modifier?

Thank you in advance for your help.

  • Leland asked 2 weeks ago
  • last active 2 weeks ago
0 votes
90 views

Hi!

I am trying to implement a custom ViewportManager for a SciChart3DSurface, but the overridden methods, such as OnCalculateNewXRange are not called after I assign the custom ViewportManager to a surface. The minimalistic version of my code is:

public class Test3DViewportManager : ViewportManager3DBase
    {
    public Test3DViewportManager() : base()
        {           
        }

    public override void OnParentSurfaceRendered(ISciChart3DSurface sciChartSurface)
        {
        base.OnParentSurfaceRendered(sciChartSurface);
        }

    protected override IRange OnCalculateNewXRange(IAxis3D xAxis)
        {
        return base.CalculateAutoRange(xAxis);
        }


    protected override IRange OnCalculateNewYRange(IAxis3D yAxis, RenderPassInfo3D renderPassInfo)
        {
        return base.CalculateAutoRange(yAxis);
        }


    protected override IRange OnCalculateNewZRange(IAxis3D zAxis, RenderPassInfo3D renderPassInfo)
        {
        return base.CalculateAutoRange(zAxis);
        }
    }

I tried to assign the custom manager is two different ways in code-behind, none of them work:

var VM= new Test3DViewportManager();
SciChart.ViewportManager = VM;  // way 1
VM.AttachSciChartSurface(SciChart); // way 2    

I would appreciate any suggestion, thanks in advance!

  • corvex asked 2 weeks ago
  • last active 5 days ago
0 votes
0 answers
86 views

Dear Devs,

I found a very strange case.

I have a measure file.
It has some values (that I want to show in chart).
Once I load the file’s values into the chart, it shows it correctly.
After I load it again, it shows just a part of the line.

No matter how many times i repeat it, it went totally random, sometimes OK, sometimes not.
I debug the values, they are always the same.

Could you help me how to solve it?

Bests,
Roland

0 votes
79 views

Sorry for the simple question and please point me to the correct place if I have missed this in the docs.

I am just trying to easily bind the DataSeries of a FastLineRenderableSeries as a custom UserControl.

In my MainView I have placed the custom control:

<customUserControls:CustomLineChart x:Name="CustomLineChart1"
                                                    Grid.Column="1"
                                                    Grid.Row="0" />

My CustomLineChart.xaml is:

 <Grid>
    <sci:SciChartSurface x:Name="simpleLineChart">
        <sci:SciChartSurface.RenderableSeries>
            <sci:FastLineRenderableSeries x:Name="lineRenderSeries"
                                          Stroke="Blue"
                                          StrokeThickness="2" >
            </sci:FastLineRenderableSeries>
        </sci:SciChartSurface.RenderableSeries>

        <!--  Create an X Axis with GrowBy  -->
        <sci:SciChartSurface.XAxis>
            <sci:NumericAxis DrawMajorBands="True"
                             GrowBy="0.1, 0.1" />
        </sci:SciChartSurface.XAxis>

        <!--  Create a Y Axis with GrowBy. Optional bands give a cool look and feel for minimal performance impact  -->
        <sci:SciChartSurface.YAxis>
            <sci:NumericAxis DrawMajorBands="True"
                             GrowBy="0.5, 0.5" />
        </sci:SciChartSurface.YAxis>
    </sci:SciChartSurface>

    <!--ect.....-->

</Grid>

I am trying to figure out how to bind the UserControl lineRenderSeries.DataSeries property in my MainViewModel

So something like this in my MainView.cs:

public partial class MainView : Window
{
    public MainView(MainViewModel vm, IMainFactory mainFactory)
    {
        InitializeComponent();
        DataContext = vm;

        CustomLineChart1.lineRenderSeries.DataSeries = vm.SomeXyDataSeries;
    }
}

Which works if the SomeXyDataSeries is set prior to this object getting created and does not update because it is not bound

Or something like this in my MainView.xaml

<customUserControls:SimpleLineChart x:Name="CoreStrategyPLGraph"
                                                    Grid.Column="1"
                                                    Grid.Row="0" 
                                                    DataSeries="{Binding SomeXyDataSeries}"/>

I have just been having an issue understanding how to properly set up this binding on the UserControl.

Any input/clarification on how to do this would be great!

Thank you,

  • Leland asked 2 weeks ago
  • last active 2 weeks ago
0 votes
93 views

Hello.

I’m now using SCIChart WPF v5.4.0.12119 at Windows10.
I have paid SC-WPF-2D-PRO licence that is already activated, and using it.

Now I want to updated SCIChart version to v6.1.0.13075.
I downloaded v6.1 installer and installed it.

When I checked the SciChart Licensing Wizard it requires log in.
(I’m using PC at network with proxy server, old Licensing Wizard has proxy setting view, but new one don’t have it…so, I’m going to use offline style)

Do you need re-activateing licence from this wizard?
And for it, do you need deactivating current licence from web page?

0 votes
104 views

Hello

I tried to create a TickProvider for DateTimeaxis followed by https://www.scichart.com/documentation/win/current/webframe.html#Axis%20Ticks%20-%20TickProvider%20and%20DeltaCalculator%20API.html .

My custom provider (CustomDateTimeTickProvider) exactly same that found in url above.

<s:SciChartSurface x:Name="sciChartrtr" 
      s:ThemeManager.Theme="Chrome"
      RenderableSeries="{s:SeriesBinding ChartSeries, UpdateSourceTrigger=PropertyChanged}">
         <s:SciChartSurface.Resources>
             <vm:CustomTickProvider  x:Key="CustomTickProvider"/>
         </s:SciChartSurface.Resources>

         <s:SciChartSurface.XAxis>
               <s:DateTimeAxis DrawMajorBands="True" TickProvider="{StaticResource CustomTickProvider}" AutoTicks="True"  TextFormatting="yyyy.MM.dd" AxisTitle="Idő"/>
          </s:SciChartSurface.XAxis>
          <s:SciChartSurface.YAxis>
                <s:NumericAxis AutoRange="Always" DrawMajorBands="True" AxisAlignment="Left" GrowBy="0.02, 0.02" AxisTitle="{Binding SecondYAxisTitle}"/>
           </s:SciChartSurface.YAxis>
           <!-- YAxis, RenderableSeries omitted for brevity -->
 </s:SciChartSurface>

But my xaxis is empty. What do I wrong?
Thank you very much

0 votes
85 views

Hello

Sorry for my poor english 😐 I would like to achieve that showed on the attached sketch. I would like to align left side of columns to the tick and not the center.
And I would like to ask, is there any solution for different bar width? So the second bar on draw starts at 2019-08-01 18:00 and ends at 2019-08-02 00:00 but third bar is twice as width as second.
Thank you.

0 votes
83 views

Hi,

I want to select the high value of the point that appears when I move my finger while holding the screen on the candlestick chart. I wrote the Custom RolloverModifier but the result has not changed. How can i change the default point position?

public class CustomRolloverModifier extends RolloverModifier
{
private final HitTestInfo hitTestInfo = new HitTestInfo();

SciChartFragmentUI sciChartFragmentUI;

public CustomRolloverModifier(SciChartFragmentUI sciChartFragmentUI)
{
    this.sciChartFragmentUI = sciChartFragmentUI;
}

@Override
protected void updateCurrentPoint(PointF currentPoint, ModifierTouchEventArgs args)
{
    try
    {
        getParentSurface().getRenderableSeries().get(0).hitTest(hitTestInfo, currentPoint.x, currentPoint.y, 0);

        double data = sciChartFragmentUI.ohlcDataSeries.getHighValues().get(hitTestInfo.dataSeriesIndex);

        ICoordinateCalculator coordCalc = sciChartFragmentUI.yAxis.getCurrentCoordinateCalculator();
        currentPoint.y = coordCalc.getCoordinate(data);

        super.updateCurrentPoint(currentPoint, args);
    }
    catch (Exception ex)
    {
        Log.e("updateCurrentPoint: ", ex.getMessage());
    }
}

}

Tnx

0 votes
122 views

Hi;

When I open Scichart for the first time, the chart view looks black until it is displayed by drawing the chart.
Is it possible to make the background in a different color until the chart is displayed?

Tnx.

0 votes
75 views

I’m using XyDataSeries<Timespan, double> to plot to my chart.

I want to show elapsed time at chart X-Axis label like below

ex) If Timespan value is 1day 2hour 30min 40sec

Default label style: 02:30:40

Label style I want: 26:30:40

How can I set like that?

0 votes
0 answers
83 views

Hello everyone.
We are trying to migrate to V3 in our iOS project and we have many issues.
One of the most important is the implementation of vertically-draggable horizontal lines.
I have a nice working code for SCICharts V2 but I cannot find any similar example of how we can implement a custom modifier for moving an SCIHorizontalLineAnnotation vertically in V3.
We have done it already with the V2 but now that we have to migrate to V3 there is a huge missing part in your documentation.
Our code was using-overiding onPanGesture() in order to figure out if the modifier should handle the touching event, then we were using the touch point in order to find the closer horizontal lines and choose the closest one in order to change the vertical value depending on the touching-changing point.
The only similar example that I found in your documentation (https://www.scichart.com/example/ios-custom-modifier/) is using SCIGestureModifier which is not accesible by the V3.
I am trying to use your SCIChartModifierBase class but cannot find anywhere a similar example of what we need.
I already tried to understand how you want us to use the ” override func onEvent(_ args: SCIModifierEventArgs!) ” function of the
SCIChartModifierBase but still no luck, it is impossible to figure out without any kind of a similar example.
The reason of needing an example is that this task needs much more information like these:
1. How to decide if the modifier should handle the touch event and how it should be ignored or handled by the next modifier in the same group ?
2. How to handle the touch started, changed, cancelled events ?
3. How to say in realtime to other modifiers in the same group that we need to to handle the same event simultaneously with this custom modifier ?
4. How to say to the group of modifiers that after the first modifer is taken the touch event then the rest should not use it ?

I will paste here our current implementation that we have done for V2 and needs to be transformed to V3 in case you need more details.

An important part is how we add the modifiers on the chart and this is how we are doing it right now:
let zoom = SCIPinchZoomModifier()
zoom.direction = .xDirection
let group = SCIChartModifierCollection(collection: [CustomModifier(chart: self),
PanModifier(),
zoom])
//group.handleGestureFirstOnly = true // Not existing in V3 anymore ! How should we do it in V3 ?
chart.chartModifiers = group

I believe that this code will be really useful for many people out there even for V2 or for migrating to V3.

Swift iOs code using SCICharts V2:

class Modifier: SCIGestureModifier {
private weak var control: ChartView?
private var editingProperty: ChartView.BindableProperty?
private var calculator: SCICoordinateCalculatorProtocol?

    init(chart: ChartView?) {
        self.control = chart
    }

    override func onPanGesture(_ gesture: UIPanGestureRecognizer?, at view: UIView?) -> Bool {

        guard let chart = view as? SCIChartSurface,
            let gesture_ = gesture
            else { return super.onPanGesture(gesture, at: view) }

        let location = gesture_.location(in: chart)
        switch gesture_.state {
        case .began:
            control?.sendActions(for: .touchDown)
            editingProperty = testForDraggableLine(location: location, in: chart)
            calculator = yAxis().getCurrentCoordinateCalculator()
            if editingProperty != nil {
                // Annotations on SciChart don't have Zindex and we want current line to be on the top
                let draggableLines = control?.chart.annotations.array.compactMap { $0 as? DraggableLine }
                if let myLine = draggableLines?.first(where: { $0.bindingKeyValue == editingProperty }) {
                    control?.chart.annotations.remove(myLine)
                    control?.chart.annotations.add(myLine)
                }
                control?.isTouchingLine(isTouching: editingProperty != nil)
            }
            return editingProperty != nil
        case .changed:
            if editingProperty != nil {
                handleDraggingLines(location: location, in: chart)
                return true
            }
        case UIGestureRecognizer.State.ended:
            if editingProperty != nil {
                control?.sendActions(for: .editingDidEnd)
                editingProperty = nil
                _ = control?.adjustYRange(force: true)
                control?.sendActions(for: .valueChanged)
                control?.refreshPositions()
                control?.isNotTouchingLine()
                return true
            }
        case UIGestureRecognizer.State.cancelled:
            if editingProperty != nil {
                control?.sendActions(for: .editingDidEnd)
                editingProperty = nil
                _ = control?.adjustYRange(force: true)
                control?.sendActions(for: .valueChanged)
                control?.refreshPositions()
                control?.isNotTouchingLine()
                return true
            }
        default:
            break
        }

        return false
    }

    private func handleDraggingLines(location: CGPoint, in chart: SCIChartSurface) {
        guard let renderSurface = chart.renderSurface,
            let yCalculator = self.calculator,
            let editingProperty = editingProperty else { return }

        let pointInChart = renderSurface.point(inChartFrame: location)
        let valueForYAxis = yCalculator.getDataValue(from: Double(pointInChart.y))
        control?.setValue(Decimal(valueForYAxis), forKey: editingProperty.rawValue)
    }

    // SOS: Filter possible properties that can be returned. We want to always avoid return - and then - dragging the current price bid or ask !
    private func testForDraggableLine(location: CGPoint, in chart: SCIChartSurface) -> ChartView.BindableProperty? {
        let hitTestDistance: Double = 30 // Pixels !
        let nearItems = chart.annotations.array
            .compactMap { $0 as? DraggableLine }
            .filter { item in
                return item.bindingKeyValue != ChartView.BindableProperty.ask &&
                    item.bindingKeyValue != ChartView.BindableProperty.bid &&
                    !item.isHidden &&
                    item.yDistance(from: location) <= hitTestDistance
            }
        return nearItems
            .sorted { $0.yDistance(from: location) < $1.yDistance(from: location) }
            .first?.bindingKeyValue
    }
}
  • Dxat asked 3 weeks ago
  • last active 3 weeks ago
0 votes
113 views

Hello

I have an XyDataSeries<DateTime, double> series, and it has filled some data. In runtime I would like to change a DateTime value on X axis (olddatetime to newdatetime). How can I do that?
Now I use solution that I remove the old XY data belongs to olddatetime and add a new XY data with newdatetime and same value. This solution works fine, but I don’t know is there a simpler solution for this?
I didn’t find any update method of XyDataSeries class which can updates an X value.
I tried the simple : XValues[olddatetimeidx] = newdatetime but problem is that SciChart surface doesn’t refresh, and I didn’t find any method that refresh all XY data.
Thank you

0 votes
107 views

Hi

I am creating a simple scatter chart, below is the code in ViewModel for getting data series, mostly from sample code.
My scenario is to be able to add this chart on a button click, so it can add multiple of this chart.
Issue is first time I click the button, dataSeries.Append works very slow, like it takes 10 seconds to pass that line, my laptop has very fast cpu and a lot of ram, so it is not hardware problem. After I added first chart, all subsequent charts added very fast, including different type of charts.
Could you please advise? thanks.

    private XyDataSeries<double, double> GenerateDataSeries(double startsAt, double[] data)
    {
        var dataSeries = new XyDataSeries<double, double>();
        var xValues = GeneratexValues(startsAt, data.Length);
        dataSeries.Append(xValues, data); <=====================
        return dataSeries;
    }
  • el yunque asked 3 weeks ago
  • last active 3 weeks ago
0 votes
96 views

I have two AxisCollections:

private AxisCollection _xAxes = new AxisCollection();
public AxisCollection XAxes
{
    get => _xAxes;
    set 
    {
        _xAxes = value;
        OnPropertyChanged("XAxes");
    }
}

private AxisCollection _yAxes = new AxisCollection();
public AxisCollection YAxes
{
    get => _yAxes;
    set
    {
        _yAxes = value;
        OnPropertyChanged("YAxes");
    }
}

Both are binded to XAxes and YAxes of SciChartSurface respectively:

   <s:SciChartSurface Grid.Row="0"
                   Grid.RowSpan="3"
                   Grid.Column="0"
                   Grid.ColumnSpan="2"
                   Panel.ZIndex="0"
                   RenderableSeries="{Binding RenderableSeries}"  
                   ChartTitle="{Binding ChartTitle}"
                   XAxes="{Binding XAxes}"
                   YAxes="{Binding YAxes}">

I try to add axes using following method:

    public void AddAxes()
{
    XAxes.Add(new NumericAxis() { AxisTitle = "X Achse"});
    XAxes.Add(new NumericAxis() { AxisTitle = "X Achse 2" });
    YAxes.Add(new NumericAxis() { AxisTitle = "Y Achse", AxisAlignment = AxisAlignment.Left});
}

Addition of a second X axis causes an exception:

“SciChartSurface didn’t render, because an exception was thrown: Message: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.”

what means “An item with the same key has already been added”. I assume (though not sure) it happens because all of the created axes have the same x:Key attribute.

How can I fix this issue?

1 vote
106 views

We are having an issue which is preventing us from upgrading to a newer version of Xamarin iOS SciChart.

With Xamarin iOS SciChart v3, the UpdateTicks method from SCINumericTickProvider cannot be overridden, because it doesn’t exist (at least not public).

In Xamarin Android SciChart v3, it works with overriding the UpdateTicks method.

In Xamarin iOS SciChart v2, it was possible to customize the ticks by overriding the method GetMajorTicksFromAxis from the class SCINumericTickProvider.

It looks like the types generation from iOS to Xamarin C# has missed to correctly export the UpdateTicks method as public overridable. (Because the docs say it should be there and it is there on Android Xamarin.)

  • Jens Stolz asked 3 weeks ago
  • last active 2 weeks ago
0 votes
108 views

When search this forum, I found that we can achieve it by adding point marker. But I am getting this error when trying to add point marker :
‘Operation: setPointMarker: is not avaliable on type: SCIHorizontallyStackedColumnsCollection’

let me know this feature(round top corners of bars) is availble or not ! Or is there any way to do this ?

0 votes
117 views

If we set ClipMode.None we can pan infinitely to the uncharted space of left and right. this is fine.
But I want to do panning infinitely only to the left side. So I set ‘clipAtMax’. This is stop panning at right. But instead of panning infinity to the left, it is stretching the left part.
Any solution ?

0 votes
130 views

Dear SCICharts support:
We have a very large project that must be migrated to version 3 because right it uses version 2.
I am stuck in the following issues:

1/ I cannot convert Double or Date to ISCIComparable.

Our x axis contains Date-timestamp values and I am trying to find the index of the dataseries.xValues of a specific Date having as parameter my Date value which is Date type and not ISCIComparable.
How can I do this ?

When I try my attempt 1:

let x: Double = <DoubleValue>
let index = dataSeries.xValues.findIndex(of: x, searchMode: .nearest, isSorted: true) 

I am getting the build error: “Cannot convert value of type ‘Date?’ to expected argument type ‘ISCIComparable?'”

When I try my attempt 2:

If I also try to iterate the xValues and find the ISCIComparable value which has doubleValue equal the x then I get the error “Type ‘ISCIList?’ does not conform to protocol ‘Sequence'”
I mean something like this:

let x: Date = Date()
var comparableValue: ISCIComparable? = nil
for val in dataSeries.xValues {
    if val.toDate() == x {
        comparableValue = val
    }
}

So any solution please ?

2/ I am trying to update the last point of dataSeries using this code:

let lastPoint = dataSeries.count - 1
if let open = dataSeries.openValues.value(at: lastPoint) {
        dataSeries.update( open: open,
                                    high: max(dataSeries.highValues().value(at: lastPoint).toDouble(), mbidPrice),
                                    low: min(dataSeries.lowValues().value(at: lastPoint).toDouble(), mbidPrice),
                                    close: mbidPrice,
                                    at: lastPoint)     }

and I get the error “Cannot convert value of type ‘ISCIComparable’ to expected argument type ‘ISCIValues?’ “
Why ? How should I do this ?

Thanks a lot in advance

  • Dxat asked 4 weeks ago
  • last active 3 weeks ago
1 vote
137 views

iPhone 6, OS 12.4.3., X-axis, Y-axis texts are shown in inverted text. We can see this issue if we download the AppStore version of SciChart app

1 vote
106 views

Stacked Bar chat: If we give 0 values, there are Black lines showing at middle of screen. please see attached screen.

1 vote
85 views

We are using stacked bar chart, and showing only 6 bars visible at a time.
In the X-Axis, the month labels are missing for alternate months & only displays all month label as a flash when graph is being scrolled. Is there any way to fix this.

1 vote
95 views

I have NUnit unit tests that use Typemock for mocking objects. The tests worked using previous versions of SciChart, but upgrading to version 6.0 and 6.1, the tests now fail with the error shown in the TestOutput.png image.

I have attempted to included a sample project zip file that the issue can be recreated by running the unit test in Class1Test.cs. I am getting an error every time I try to upload the file: Failed uploading file. Error code: 1. Maybe there is another way for me to get you this zip?

Any ideas on how to fix this would be greatly appreciated

  • Doug Witt asked 4 weeks ago
  • last active 3 weeks ago
0 votes
129 views

Out WPF application is currently targeting .net 4.7.2 and we don’t have plan to upgrade to .net core soon. The sample code requires .net core, we would like to know if you could provide a set of sample code targeting .net 4.7.2.

Thanks.

  • el yunque asked 4 weeks ago
  • last active 4 weeks ago
0 votes
0 answers
120 views

Hello, we are trying to add HotizontalLineAnnotations to our candlestick chart on tap. But we’ve got the following error :

mView does not exist, so discard the remaining points. java.lang.NullPointerException: Attempt to invoke interface method ‘java.lang.Comparable com.scichart.charting.visuals.axes.IAxis.getDataValue(float)’ on a null object reference

I’ve tried to set axisIds for annotations, but it seems that it doesn’t help. Could you please help me with this issue?

 val annotationCreationModifier = AnnotationCreationModifier()
    val annotationFactory = DefaultAnnotationFactory()

    annotationCreationModifier.annotationType = 6 // Horizontal Line
    annotationCreationModifier.annotationFactory = annotationFactory
    annotationCreationModifier.setAnnotationCreationListener {
        it.setIsEditable(true)
    }

    candleChartSurface.chartModifiers.add(sciChartBuilder
            .newModifierGroup()
            .withModifier(annotationCreationModifier)
            .build()
    )
0 votes
135 views

We need to generate adhoc ipa file for review purpose and we are using the trial version, but its fails. Can you help us on the same?

1 vote
0 answers
118 views

I’ve set the width value to matchParent. How do I remove this unwanted space on the right side of the chart?

0 votes
105 views

How can we restrict stacked graph chart scrolling to future date ?

1 vote
92 views

On clicking any where on stacked bar chart it shows the x axis value. How can we disable the highlight ?

0 votes
126 views

I want to click on the data points and get the x and y co-ordinate values stored somewhere, as I further need the data point values. I have already searched for many examples and codes but I’m not able to implement this in my Windows form application (C#). There are some good examples are given on dataPoint selection but I want to use that in my c# code, can you please provide me a example of this in c# instead of xaml.
I have already referred to the below links but not able to find a solution to my problem.

https://www.scichart.com/documentation/win/current/DataPoint%20Selection.html
https://www.scichart.com/example/wpf-chart-example-pointmarkers-selection/

0 votes
170 views

Hello

I have got a valid licence, but I have got an error when I run my app. I generate runtime key on my profile page (schichart.com/profile), I write this runtime key into SciChartSurface.SetRuntimeLicenseKey function, but doesn’t work. The error occurs in xaml <s:SciChartSurface> tag, and text is

"Sorry, You need to have a licence to use Scichart.For instructions...."

What can I do?

Thank you very much.

0 votes
111 views

I’ve received this crash report for a long time since I use this SDK.
But now it’s the largest amount of crash report in the newest version.
Do you have any idea about this?
I use the SDK to show meter temperature and humidity data. It’s about 10k to 30k data show in the chart and every time the user has download the data or the user zoom, drag the chart will recalculate the min, max, avg number in the visible time range.
Thank you~

  • Switch Bot asked 1 month ago
  • last active 1 month ago
0 votes
113 views

After upgraded SciChart to SciChart_iOS_SDK_3.0.0.5074, using rollover modifier on a SciChart surface which was embedded into a scroll view will crash the app. It crashed when user scroll horizontally on a SciChart surface inside a horizontal scrollable scrollview. It is the same with the vertically scrollable scrollview.

2020-03-09 10:14:15.489302+0800 ******[4835:62890] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500

2020-03-09 10:14:15.503967+0800 *******[4835:62890] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c
forwarding + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 SciChart 0x000000011139aaba -[SCITouchModifierBase onEvent:] + 186
6 SciChart 0x000000011135dfd8 +[SCIEventManager raiseOnEvent:toTarget:isMaster:] + 267
7 SciChart 0x000000011132d03f __38-[SCIEventDispatcher p_SCI_commonInit]_block_invoke + 165
8 SciChart 0x000000011132d45d -[SCIEventDispatcher raiseOnEvent:withAction:] + 569
9 SciChart 0x000000011133fa94 -[SCIChartSurfaceBase p_SCI_onTouchEvent:] + 233
10 SciChart 0x000000011133f996 -[SCIChartSurfaceBase touchesCancelled:withEvent:] + 209
11 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
12 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
13 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
14 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
15 UIKitCore 0x00007fff480a4a43 __106-[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:]_block_invoke + 609
16 UIKitCore 0x00007fff480a429e -[UIApplication _cancelTouchesOrPresses:withEvent:includingGestures:notificationBlock:] + 1163
17 UIKitCore 0x00007fff480a47ac -[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:] + 158
18 UIKitCore 0x00007fff47c37f2f -[UIGestureEnvironment _cancelTouches:event:] + 707
19 UIKitCore 0x00007fff47c40115 -[UIGestureRecognizer _updateGestureForActiveEvents] + 1779
20 UIKitCore 0x00007fff47c31eda _UIGestureEnvironmentUpdate + 2706
21 UIKitCore 0x00007fff47c3140a -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 467
22 UIKitCore 0x00007fff47c3117f -[UIGestureEnvironment _updateForEvent:window:] + 200
23 UIKitCore 0x00007fff480d04b0 -[UIWindow sendEvent:] + 4574
24 UIKitCore 0x00007fff480ab53b -[UIApplication sendEvent:] + 356
25 UIKit 0x0000000114ad2bd4 -[UIApplicationAccessibility sendEvent:] + 85
26 UIKitCore 0x00007fff4812c71a __dispatchPreprocessedEventFromEventQueue + 6847
27 UIKitCore 0x00007fff4812f1e0 __handleEventQueueInternal + 5980
28 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
29 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76
30 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180
31 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263
32 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
33 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
34 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
35 ****** 0x000000010b51505f main + 143
36 libdyld.dylib 0x00007fff5227ec25 start + 1
37 ??? 0x0000000000000001 0x0 + 1
)

  • Gary Chan asked 1 month ago
  • last active 1 month ago
Showing 1 - 50 of 3k results