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

0 votes
0 answers
5 views

We have 2 graph surfaces with 2 Y axes on each side, but the label formatting of the axes is different. That makes the axes widths different and therefore both the graphs appear as they have different widths. Is there a way to make the axis widths fixed so the graphs can be the same size?

0 votes
16 views

Hello,

is it possible to color the curve with different color(s) after specific value(s)
to sumurise the idea, please see the illistustration in this image : https://i.stack.imgur.com/1MWKL.png

Thank you for your support

Regards

0 votes
19 views

Hi ,

Does scichart graph X-Axis supports datetime?

I am getting examples with only NumericAxis examples in internet.

So is it possible to send me some code snippet with datetime with X-Axis.

Thanks & regards,
Kartik K

  • kartik K asked 2 days ago
  • last active 2 days ago
0 votes
0 answers
11 views

Hello

Currently trying this:

final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
            .withAutoRangeMode(AutoRange.Never)
            .withTextFormatting("#.0000")
            .withVisibleRangeLimit(1.143, 1.146)
            .build();

Works perfectly with values .withVisibleRangeLimit(1.14, 1.15), but every time i go for more precision – range is default 0-10

Please help

Edit:
Also works fine with

.withVisibleRangeLimit(1.1433, 1.1566)

Question 2.
Is there a way to determine that live chart was scrolled by finger or by animation (when adding new point)?

0 votes
22 views

a) change y and z axis order , must be (x,y)->z,
b) the contour graph is sliced in rectangular form when colored, how to solve this?

a) we are trying product, but when I draw surface graph z data come to y axis or tooltip label,I use like this
int xSize = 15;
int ySize = 100;

        var meshDataSeries = new UniformGridDataSeries3D<double>(xSize, ySize)
        {



            SeriesName = "Uniform Surface Mesh",
        };


        int h = 0;

        for (int x = 0; x <xSize; x++)
            for (int y = 0; y < ySize; y++)
        {

            {

                double z =(double) shortArrayz[h];
             meshDataSeries[y, x] = z;

                h += sizeof(short);

            }

b) images attached, contour graph code is atteched

  • bar asked 2 days ago
  • last active 1 day ago
0 votes
43 views

I have a ViewPager which switches between Fragments that have a SciChartSurface in their layout. I have two problems with this.

  1. When swiping the ViewPager the SciChartSurface shows a black bar on its side (see attached image).

  2. When swiping I cannot achieve 60 fps on my device. Upon inspecting systrace I see scheduling delay for each frame. Upon inspecting Android profiler’s flame chart I see that SurfaceView calls android.os.BinderProxy.transact() which takes most of the time. If I change the layout of the Fragments used in ViewPager to a normal View, then android.os.MessageQueue.nativePollOnce() takes about 80% of the time, which means most of the time the CPU is idling because drawing takes up so little time.

My question is how can I solve both problems. Have I configured the SciChartSurface wrongly to get the black bars. Can I do anything to speed up changing tabs in ViewPager with SciChartSurfaces in the Fragments?


Edit 14. 1. 2019

I have attached a sample project to reproduce the problem.

0 votes
37 views

Dear SciChart Team:

I want to have two vertical lines on the graph and get the spacing of the two lines as the mouse moves,
as shown in the attached picture.

Can you provide a simple example showing the architecture of this feature?

0 votes
48 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

0 votes
33 views

I’d like to display the values of series data points using TooltipModifer.

However, if you hold the mouse cursor over the series, the tool tip will be displayed even if there are no data points.

Attach a movie to explain the phenomenon.

I would like to display the tool tip only when I hold the mouse cursor where I have the data point, how can I do it?

0 votes
40 views

As shown in the attached image, if you display a small value with TooltipModifier, it will be rounded to 0 and displayed.

I specified ContentStringFormat with Xaml, but the decimal point is not displayed.

How can I correctly display it?

1 vote
57 views

Hi,

Good day!

We would like to inquire if there have been updates with project “Spaceship” – cross platform chart initiative (https://www.scichart.com/scichart-2017-vision-market-leader-cross-platform-charts/).

We are currently interested in accessing the scichart’s libraries though Web platforms.

We have just started studying the sample code in git (https://github.com/ABTSoftware/SciChart.NativeScript.Examples).
Though the last updates were 2 years ago.

Hoping for your response.

Best regards,
Jerwine

0 votes
32 views

Hello, I have two questions. The first is we use the annotations to create threshold lines and labels on axis. We would like these lines to appear in the legend data. Is there a way to add them manually to the collection of seriesinfo? What do you recommend.

The second question is that we have a large amount of series data and we were rendering the chart to bitmap. When there is a lot of data the legend is in a scrollview and you cannot see all of it. What do you recommend do in this scenario. Is there a way to make the legend appear in wrap panel?

Thanks, Kurt

0 votes
34 views

Hello. I’d like to be able to double-click on a point, present a prompt to the user to enter in an X and Y value, and then set that point to the new value.

I can handle the prompt but I’m not too sure the best way to setup a double-click on a point to trigger a command.

Any help would be appreciated. Thanks!

  • Greg Knox asked 7 days ago
  • last active 3 days ago
0 votes
41 views

final IAxis yAxis = sciChartBuilder.newNumericAxis()
.withAxisAlignment(AxisAlignment.Bottom)
.withFlipCoordinates(true)
.build();
final IAxis xAxis = sciChartBuilder.newNumericAxis()
.withAxisAlignment(AxisAlignment.Left)
.withFlipCoordinates(true)
.build();
Collections.addAll(surface.getYAxes(), yAxis);
Collections.addAll(surface.getXAxes(), xAxis);
surface.getChartModifiers().add(new RolloverModifier());

In this case rollover modifier will only catch the very first point of line series.

0 votes
43 views

It seems like a memory leak of sciChartSurface. After call Dispose(), some sciChartSurfaces are also refrenced by MouseManager and can’t release.

I also use ants memory profiler, but this web page can’t upload images and attachments, it alerts Forbidden!

The leak instance reference chain is:
MouseManager.I -> Dictionary<string,IList<Mouse.IReceiveMouseEvents>> -> SciChart.Core.Utility.Mouse.IReceiveMouseEvents[] -> SciChart.Charting.ChartModifiers.ModifierGroup -> SciChart.Charting.Visuals.SciChartSurface .

Below is the key code:

>

    private SciChartSurface sciTickPriceChartSurface;
    private FastLineRenderableSeries lastPriceLineRenderableSeries;
    private SciChartSurface sciTickVolumeChartSurface;
    private FastLineRenderableSeries volumeLineRenderableSeries;

    private void LoadSciTickCharts()
    {
        // set sciTickPriceChartSurface xAxis
        var nowDateTime = DateTime.Now; 
        var todayDate = nowDateTime.Date;

        // set sciTickPriceChartSurface
        sciTickPriceChartSurface = new SciChartSurface();
        sciTickPriceChartSurface.ViewportManager = new TickChartViewportManager(todayDate);

        var priceChartXAxis = new DiscontinuousDateTimeAxis
        {
            DrawLabels = false,
            MajorDelta = new TimeSpan(1, 0, 0),
            MinorDelta = new TimeSpan(0,12,0),
            MinimalZoomConstrain = new TimeSpan(1,0,0),
            AutoTicks = false,
            DrawMajorGridLines = true,
            DrawMinorGridLines = false,
            AutoRange = AutoRange.Never,
            LabelProvider = new TickDateTimeAxisLabelProvider(),
            //Calendar = new LSECalendar(), 
            VisibleRange = new DateRange(nowDateTime - new TimeSpan(1,0,0), nowDateTime + new TimeSpan(3,0,0)),
        };

        sciTickPriceChartSurface.XAxes.Add(priceChartXAxis);

        // set sciTickPriceChartSurface yAxis
        var priceYAxis = new NumericAxis
        {
            DrawMajorGridLines = true,
            DrawMinorGridLines = false,
            AutoRange = AutoRange.Always,
            GrowBy = new DoubleRange(0.2, 0.2)
        };
        sciTickPriceChartSurface.YAxes.Add(priceYAxis);

        // lastPriceLineSeries
        lastPriceLineRenderableSeries = new FastLineRenderableSeries
        {
            Stroke = Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF),
            StrokeThickness = 1,
            DataSeries = new XyDataSeries<DateTime, double>(),
        };
        sciTickPriceChartSurface.RenderableSeries.Add(lastPriceLineRenderableSeries);
        CursorModifier.SetSnapToSeries(lastPriceLineRenderableSeries, true);

        // sciTickVolumeChartSurface
        sciTickVolumeChartSurface = new SciChartSurface();

        // set sciTickVolumeChartSurface yAxis
        var volumeYAxis = new NumericAxis
        {
            DrawMajorGridLines = true,
            DrawMinorGridLines = false,
            AutoRange = AutoRange.Always,
            GrowBy = new DoubleRange(0, 0)
        };
        sciTickVolumeChartSurface.YAxes.Add(volumeYAxis);

        var volumeChartXAxis = new DiscontinuousDateTimeAxis
        {
            DrawLabels = true,
            MajorDelta = new TimeSpan(1, 0, 0),
            MinorDelta = new TimeSpan(0, 12, 0),
            MinimalZoomConstrain = new TimeSpan(1, 0, 0),
            AutoTicks = false,
            DrawMajorGridLines = true,
            DrawMinorGridLines = false,
            AutoRange = AutoRange.Never,
            LabelProvider = new TickDateTimeAxisLabelProvider(),
            //Calendar = new LSECalendar()
        };
        sciTickVolumeChartSurface.XAxes.Add(volumeChartXAxis);

        // Bind the VisibleRange of chart2.XAxis.VisibleRange to chart1.XAxis.VisibleRange TwoWay
        var xAxisVisibleRangeBinding = new Binding("VisibleRange")
        {
            Source = priceChartXAxis,
            Mode = BindingMode.TwoWay,
        };
        BindingOperations.SetBinding(volumeChartXAxis, SciChart.Charting.Visuals.Axes.AxisBase.VisibleRangeProperty, xAxisVisibleRangeBinding);

        // volumeLineSeries
        volumeLineRenderableSeries = new FastLineRenderableSeries
        {
            Stroke = Color.FromArgb(0xFF, 0x0, 0xFF, 0xFF),
            StrokeThickness = 1,
            DataSeries = new XyDataSeries<DateTime, long>(),
        };
        sciTickVolumeChartSurface.RenderableSeries.Add(volumeLineRenderableSeries);
        CursorModifier.SetSnapToSeries(volumeLineRenderableSeries, true);

        var grid = new Grid();
        grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(2, GridUnitType.Star) });
        grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
        grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });

        var gridSplitter = new GridSplitter
        {
            MinHeight = 4,
            HorizontalAlignment = HorizontalAlignment.Stretch,
            Background = new SolidColorBrush(Color.FromRgb(0xFF, 0xFF, 0x0))
        };

        Grid.SetRow(sciTickPriceChartSurface, 0);
        Grid.SetRow(gridSplitter, 1);
        Grid.SetRow(sciTickVolumeChartSurface, 2);

        grid.Children.Add(sciTickPriceChartSurface);
        grid.Children.Add(gridSplitter);
        grid.Children.Add(sciTickVolumeChartSurface);

        var priceChartSurfaceModifier = new ModifierGroup(

            // Allow pan on Left mouse drag
            new ZoomPanModifier { ExecuteOn = ExecuteOn.MouseLeftButton, ClipModeX = SciChart.Charting.ClipMode.None },
            // <!-- Allow Mousewheel Zoom -->
            new MouseWheelZoomModifier(),
            // <!-- Allow Zoom to Extents on double click -->
            new TickChartZoomExtentsModifier { ExecuteOn = ExecuteOn.MouseDoubleClick },
            // Alow cursor modifier
            new CursorModifier
            {
                SourceMode = SourceMode.AllSeries,
                ShowTooltipOn = ShowTooltipOptions.Always,
                ShowAxisLabels = true,
                ReceiveHandledEvents = true,
                ShowTooltip = true,
                IsEnabled = true,
            }
        );
        sciTickPriceChartSurface.ChartModifier = priceChartSurfaceModifier;

        var volumeChartSurfaceModifier = new ModifierGroup(

            // Allow pan on Left mouse drag
            new ZoomPanModifier { ExecuteOn = ExecuteOn.MouseLeftButton, ClipModeX = SciChart.Charting.ClipMode.None },
            // <!-- Allow Mousewheel Zoom -->
            new MouseWheelZoomModifier(),
            // <!-- Allow Zoom to Extents on double click -->
            new TickChartZoomExtentsModifier { ExecuteOn = ExecuteOn.MouseDoubleClick },
            // Alow cursor modifier
            new CursorModifier
            {
                SourceMode = SourceMode.AllSeries,
                ShowTooltipOn = ShowTooltipOptions.Always,
                ShowAxisLabels = true,
                ReceiveHandledEvents = true,
                ShowTooltip = true,
                IsEnabled = true,
            }
        );
        sciTickVolumeChartSurface.ChartModifier = volumeChartSurfaceModifier;

        var tickChartsMouseEventSharedGroupName = UUIDHelper.CreateUUIDString(false).ToString();
        MouseManager.SetMouseEventGroup(priceChartSurfaceModifier, tickChartsMouseEventSharedGroupName);
        MouseManager.SetMouseEventGroup(volumeChartSurfaceModifier, tickChartsMouseEventSharedGroupName);

        var tickChartSharedGroupName = UUIDHelper.CreateUUIDString(false).ToString();
        SciChartGroup.SetVerticalChartGroup(sciTickPriceChartSurface, tickChartSharedGroupName);
        SciChartGroup.SetVerticalChartGroup(sciTickVolumeChartSurface, tickChartSharedGroupName);

        this.ChartGrid.Children.Clear();
        this.ChartGrid.Children.Add(grid);
    }

    public void Dispose()
    {
        if (isDisposed == true) return;
        isDisposed = true;

        // Don't forget to clear chart grid child list.
        ChartGrid.Children.Clear();

        if (sciTickPriceChartSurface != null)
        {
            // Chart's Dispose method needs to be called when chart is 
            // no longer needed so that all unmanaged resources 
            // (DirectX etc.) are released.
            sciTickPriceChartSurface.ChartModifier?.OnDetached();
            sciTickPriceChartSurface?.Dispose();
            sciTickPriceChartSurface = null;

        }
        if (sciTickVolumeChartSurface != null)
        {
            // Chart's Dispose method needs to be called when chart is 
            // no longer needed so that all unmanaged resources 
            // (DirectX etc.) are released.
            sciTickVolumeChartSurface?.ChartModifier?.OnDetached();
            sciTickVolumeChartSurface?.Dispose();
            sciTickVolumeChartSurface = null;
        }
        GC.SuppressFinalize(this);
    }
0 votes
38 views

I making MVVM application.

I want to Bind SelectedPointMarkers of DataPointSelectionModifier.
But SelectedPointMarkers is readonly property.

Therefore, I couldn’t bind.

How can I bind it?

0 votes
41 views

I want to create a chart with Fixed number of column series with uniform width. For example, X Asis visible range is 0-100 and i want to have 5 column series, 1st column range is 0-20, 2nd columns is 20-40, 3rd column is 40-60 ,4th coulmn is 60-80 and 5th column is 80-100. and there should not be space between columns.I have attached a screen shot of chart that i expected. Please let me know whether its possible?
Thanks

  • deepak b asked 1 week ago
  • last active 1 week ago
0 votes
57 views

I’m trying to build a chart control that adheres to MVVM and noticed that I have the option to use NumericAxis or NumericAxisForMvvm, but I’m not sure exactly what the differences would be. I couldn’t really find anything in depth on them in the documentation but maybe I missed something.

Is anyone aware of any differences? I’m assuming NumericAxisForMvvm would be best for what I’m wanting but I’m not exactly sure why.

Thanks!

  • Greg Knox asked 1 week ago
  • last active 1 week ago
0 votes
49 views

Hi,

we’ve just update scichart from 5.1.0.11425 -> 5.2.1.11757

Since this, the renderable series is not updating when the bound property change is notified.

anybody else seen this?

            <s:XyScatterRenderableSeries DataSeries="{Binding AcceptableDataPoints}" s:TooltipModifier.TooltipTemplate="{StaticResource XyTooltipTemplate}">
                <s:XyScatterRenderableSeries.PointMarker>
                    <s:EllipsePointMarker Width="9" Height="9"  Fill="#AAFFFFFF" Stroke="SteelBlue" StrokeThickness="2" ></s:EllipsePointMarker>
                </s:XyScatterRenderableSeries.PointMarker>
            </s:XyScatterRenderableSeries>
1 vote
0 answers
51 views

I’m trying to create a spectrum viewer with your library. One important feature is a cursor supporting both automatic mode and manual mode. In automatic mode, it stays at the maximum value. In manual mode, it moves with finger panning. It’s close to the SCICursorModifier with the cross lines, but it should always stay on the plot even without touch. Also it should reside on real data points instead of anywhere in between like the SCIRolloverModifier instead of the SCICursorModifier.

Could you give me some advices about how to achieve it? Thanks.

EDIT: after reading more of your documents, I believe HorizontalLineAnnotation and VerticalLineAnnotation are the way to go. I have already added them as the automatic mode cursor. For the manual mode, I still need your help to achieve either:
1) a callback function for the VerticalLineAnnotation drag event, so that I could move both lines to the corresponding data point
or
2) a custom ZoomPanModifier to allow me to distinguish one point or two points touch: one point panning to move the whole plot and two points panning to determine the new cursor location and redraw the two annotations there

EDIT2: I was able to create a custom VerticalLineAnnotation class to handle the panning event. There is one more question left. Right now in order to update the verticallineannotation and horizontallineannotation on the graph, I remove them from sciChartSurface.annotations, change x/y locations and add them back. Is there a redraw or refresh or update function to call directly?

Thanks

  • Haoran Xie asked 2 weeks ago
  • last active 1 week ago
0 votes
0 answers
67 views

Hello,
I managed to implement a chart legend with a custom datasource (using just a SCIChartLegend object as a subview, not SCILegendModifier). However, I am unable to place the legend at specified position, it always snaps to upper-left corner of the screen. When creating a SCIChartLegend instance using the initializer that takes a Rect as a parameter, but not supplying a custom datasource, it draws correctly according to offsets specified by the supplied rect’s X and Y. It does respond to changes in the legendPosition property, but it still doesn’t allow to draw the view with any margins (which is what I’m actually trying to achieve).

0 votes
56 views

The numeric axis in our app weirdly displays the range from -2000 until 8000, even if it has or hasn’t got data series appended to it. I tried setting the VisibleRange and VisibleRangeLimit when creating the axis, but still no results. Here’s a piece of the code:

new SCINumericAxis
{
   AxisAlignment = SCIAxisAlignment.Left,
   AxisId = "axis_id",
   TextFormatting = " 0%",
   VisibleRangeLimit = new SCIDoubleRange(-30, 100),
   VisibleRange = new SCIDoubleRange(-30, 100)
};

The Y values that we have are doubles, example:

[0]: 98.26171875
[1]: 0
[2]: NaN
[3]: 98.26171875
[4]: 0
[5]: NaN
[6]: 78.203125
[7]: NaN
[8]: 38.96484375
[9]: NaN
[10]: 98.28125
[11]: 0
[12]: NaN
[13]: 68.22265625
[14]: 0

So just by looking at the values, we should have a data range from 0 to 100, but I think somehow it messes up the conversion and ends up with ridiculously large numbers. I’m not doing any additional operations on the data, the printed data above is the data from the XyDataSeries. The Y type is Double, the YMin is 0, the YMax is 98, but still ends up drawing the values until 10000.

0 votes
0 answers
62 views

I would like to format several lines differently while still scaling them all to the same YAxis. For example if one line needs to go out to 4 decimal places but then another does not need any decimal values at all i would like those formats to be represented in all of the tooltips with said formats.

0 votes
0 answers
77 views

Hello,
I would like to place a title for an X axis to the right of axis labels. I am easily able to achieve this on Android (see attached screenshot), but I cannot find relevant properties (axisTitlePlacement etc.) in iOS version of SciChart.

In the last section of this article in documentation you write that it is possible, however the links are dead (and frankly, the method names look suspiciously Java-ish to me).

1 vote
76 views

I am making a waterfall 3D chart like the Simple Waterfall 3D Chart of SciChart WPF Example Suite.

The Simple Waterfall 3D Chart is not displayed when changing the window size repeatedly.

After that, it is displayed when moving the screen. I do not know why.

0 votes
87 views

I have a chart that has real-time data being added to it and I want to ensure the chart sizes up to show everything. This chart also displays series that have already been added and I would like to zoom in/out on those. How would I handle both of these at the same time?

0 votes
0 answers
78 views

We have created graph for x axis string and y axis double. we have create object like this XyDataSeries<string,double> if run app getting exception error .

How to declare and how to use it .

1 vote
0 answers
81 views

I’m having difficulty determining the easiest method of placing the legend outside of the chart surface in iOS. I’ve done a ton of trial and error and have run into several issues. I understand that the SCIChartLegend class is just a subclass of UICollectionView. The problem seems to be these two things:

— When adding a legend via SCILegendModifier it only allows for custom placement if using SCILegendModifier’s initializer which also requires you assign an SCILegendDataSource. Or at least that’s required for the initializer with the useAutoPlacement parameter that I can then set to false (not even sure if that would work once I got that far).

— Placing the SCIChartLegend view manually without first initializing an SCILegendModifier with it results in none of the legend cells being loaded. I would imagine this is due to a missing SCILegendDataSource.

It seems like these could be overcome if I could somehow construct a default instance of SCILegendDataSource. Unfortunately, SCILegendDataSource only exposes one initializer which requires I pass it a xib name for the legend items. But I do not want to customize the legend items- I simply want to be able to construct the default SCILegendDataSource because that is apparently required to get the SCIChartLegend working.

Am I making this more complicated than it needs to be? What’s the simplest path to placing the chart legend where I want in iOS?

  • Sean Young asked 4 weeks ago
  • last active 2 weeks ago
0 votes
92 views

i want to insert 500 data on the left of chart.
then, it freezes slightly.
so, i want to present indicator.
how can i listen to start and end of drawing?

0 votes
89 views

We are making SCIChart with MVVM.
For the Model layer, we use .NET Standard 2.0.
The View layer and the ViewModel layer use .Net Framework 4.7.1.

Since we want to aggregate into the logic in the Model layer,
I would like to use some of the parts SciChart provides with .NET Standard 2.0.

An example
SciChart.Charting.Model.DataSeries.IPointMetadata
SciChart.Charting.Model.DataSeries.IXyDataSeries

How can I decide whether the SCI offering class can be used in .NET Standard?

By acquiring “SciChart (5.2.1.11757)” from NuGet in the library of the Model layer,
I could confirm that it work correctly.

What is the package for the .Net Standard 2.0 project?

Thank you.

0 votes
97 views

enter image description hereHi,

I have 3 separate line series and 1 column bar series. Whenever I switch between activities, Column bar data and range persist but not for the line series.

Whenever I return back from activityB to ActivityA it never calls restoreInstanceState. How can I persist the states of these graph?

Snap short attached for reference.

—–code,

initChartUI() {

    SciChartBuilder.init(mContext)
    sciChartBuilder = SciChartBuilder.instance()

    xyIapDataSeries =
            sciChartBuilder.newXyDataSeries(Date::class.javaObjectType, Short::class.javaObjectType)
                .withSeriesName(getString(R.string.label_iap)).build()

    xyTempDataSeries =
            sciChartBuilder.newXyDataSeries(Date::class.javaObjectType, Short::class.javaObjectType)
                .withSeriesName(getString(R.string.label_temperature)).build()

    xyUoDataSeries =
            sciChartBuilder.newXyDataSeries(Date::class.javaObjectType, Short::class.javaObjectType)
                .withSeriesName(getString(R.string.label_uo)).build()

    xyRrDataSeries =
            sciChartBuilder.newXyDataSeries(Date::class.javaObjectType, Short::class.javaObjectType)
                .withSeriesName(getString(R.string.label_respiratory_rate)).build()

    initChartIap(iap_chart)
    initChartUo(uo_chart)
    initChartTemp(temperature_chart)
    initChartRR(resp_rate_chart)

}

private fun initChartIap(surface: SciChartSurface) {
val xAxis = sciChartBuilder.newCategoryDateAxis()
.withBarTimeFrame(SECONDS_IN_FIVE_MINUTES.toDouble())
.withDrawMinorGridLines(false)
.withGrowBy(0.0, 0.5)
.build()
val yAxis = sciChartBuilder.newNumericAxis().withAutoRangeMode(AutoRange.Always).build()

    val line = sciChartBuilder.newLineSeries().withStrokeStyle(R.color.accuryn_blue, STROKE_THICKNESS)
        .withDataSeries(xyIapDataSeries).build()

    // Create a Stroke Pen and assign it
    val strokePen = SolidPenStyle(resources.getColor(R.color.accuryn_blue, null), true, 2f, null)
    line.strokeStyle = strokePen

    UpdateSuspender.using(surface) {
        Collections.addAll(surface.xAxes, xAxis)
        Collections.addAll(surface.yAxes, yAxis)
        Collections.addAll<BaseRenderableSeries>(surface.renderableSeries, line)
        Collections.addAll<AxisMarkerAnnotation>(surface.annotations, iapAxisMarker)
        Collections.addAll(
            surface.chartModifiers, sciChartBuilder.newModifierGroup()
                .withXAxisDragModifier().build()
                .withZoomPanModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).build()
                .withPinchZoomModifier().build()
                .build()
        )
    }

……
rest 3 other types….
…..
override fun onSaveInstanceState(outState: Bundle) {

    outState.run {
        putInt("count", xyIapDataSeries.count)
        putInt("uoCount", xyUoDataSeries.count)
        putInt("tempCount", xyTempDataSeries.count)
        putInt("rrCount", xyRrDataSeries.count)

        val iapRange = iap_chart.xAxes[0].visibleRange
        val uoRange = uo_chart.xAxes[0].visibleRange
        val tempRange = temperature_chart.xAxes[0].visibleRange
        val rrRange = resp_rate_chart.xAxes[0].visibleRange

        putDouble("rangeIapMin", iapRange.getMinAsDouble())
        putDouble("rangeIapMax", iapRange.getMaxAsDouble())
        putDouble("rangeUoMin", uoRange.getMinAsDouble())
        putDouble("rangeUoMax", uoRange.getMaxAsDouble())
        putDouble("rangeTempMin", tempRange.getMinAsDouble())
        putDouble("rangeTempMax", tempRange.getMaxAsDouble())
        putDouble("rangeRrMin", rrRange.getMinAsDouble())
        putDouble("rangeRrMax", rrRange.getMaxAsDouble())
    }
    super.onSaveInstanceState(outState)
}

override fun onPostCreate(savedInstanceState: Bundle?) {
super.onPostCreate(savedInstanceState)

    updateIapData(savedInstanceState)
    updateUoData(savedInstanceState)
    updateTempData(savedInstanceState)
    updateRRData(savedInstanceState)
}

override fun onRestoreInstanceState(savedInstanceState: Bundle?) {
    super.onRestoreInstanceState(savedInstanceState)
     updateIapData(savedInstanceState)
    updateUoData(savedInstanceState)
    updateTempData(savedInstanceState)
    updateRRData(savedInstanceState)
}

private fun updateIapData(savedInstanceState: Bundle?) {
UpdateSuspender.using(iap_chart) {
var count = DEFAULT_POINT_COUNT
if (savedInstanceState != null) {
count = savedInstanceState.getInt(“count”)

            val rangeMin = savedInstanceState.getDouble("rangeIapMin")
            val rangeMax = savedInstanceState.getDouble("rangeIapMax")

            iap_chart.xAxes[0].visibleRange.setMinMaxDouble(rangeMin, rangeMax)
        }

        val iap = mutableListOf<Short>()
        val date = mutableListOf<Date>()
        for (entry in mSimplifiedDataList) {
            if (entry.emr.iap > 0) {
                iap.add(entry.emr.iap)
                date.add(Date(DateTimeUtils.toEpochMilli(entry.getRtcTimeStamp())))
            } else {
                iap.add(0)
                date.add(Date(DateTimeUtils.toEpochMilli(entry.getRtcTimeStamp())))
            }
        }
        tv_iap_input_data.text = iap[iap.size.minus(1)].toString()
        xyIapDataSeries.append(date, iap)
    }
}

……rest other for updating data over UI.

0 votes
92 views

Legend

I have graphs on two adjacent fragments, and when I select one, then swap to the other, the legend draws like this.
I believe it is because I am setting up & drawing the graph when it is off screen. As when you are viewing a fragment it loads the ones to either side for smooth operation, but is there any way to fix this? Maybe I’m doing something wrong and that’s why I’m getting the weird check boxes.

To be clear, these are all checked, but they look weird to our end-users

0 votes
100 views

I have stock charts and want to prevent the user to go beyond the Min/Max datetimes (left, right). I tried applying setVisibleRangeLimitMode() to XAxis but it has no effect:

private final DoubleRange sharedXRange = new DoubleRange();

//sharedXRange.setMinMax(0d, response.body().getData().size()-1d); // not helping
...
final CategoryDateAxis xAxis = sciChartBuilder.newCategoryDateAxis()
        .withVisibility(isMainPane ? View.VISIBLE : View.GONE)
        .withVisibleRange(sharedXRange)
        .withGrowBy(0.1d, 0.1d)
        .build();

xAxis.setMinimalZoomConstrain(10d); // minimum 10 points
xAxis.setVisibleRangeLimitMode(RangeClipMode.MinMax); // not working
//xAxis.setVisibleRangeLimit(new DoubleRange(-5d,5d));
...

I am thinking that maybe I should set Min and Max to sharedXRange, but couldn’t find in the docs what value to put into (tried with index, and Date without luck).

  • Primoz asked 1 month ago
  • last active 4 weeks ago
1 vote
0 answers
72 views

I want to reference javadocs for the library in Android Studio. According to the tutorial, “You can find javadoc files in \Libs\Docs folder:”. But I haven’t installed anything, just added the libraries using Maven. I searched for Docs folder, but could not find it.

Where are javadocs located or where do we download them?

0 votes
74 views

I am using Android charts and would like to know more about how to customize the YAxis. In the tutorials, there is ussualy something like

builder.newNumericAxis()
.withMinorsPerMajor(4)
.withMaxAutoTicks(8)
.withGrowBy(new DoubleRange(0.1, 0.1))
.build();

In the documentation, I can’t find any explanation for withGrowBy(). What is it used for and are there any examples? What does it mean to have DoubleRange(0.1, 0.1) or DoubleRange(0.01, 0.01)?

  • Primoz asked 1 month ago
  • last active 1 month ago
0 votes
82 views

Hello,

I’m working on an analysis software that uses Scichart API for generating graphics in WPF.

I recently used Scichart IOS / Android apps and I really liked the graphics animations.

However, I did not find the way to do the same thing in WPF.

Is it possible to animate the loading of graphics or any other animation?

Thank you.

0 votes
87 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
79 views

hi everyone
when i use utf8 string such as ‘محور’ = axis in persian sciChart lookLike this .
i tried different fonts but did not work .

 SciChartBuilder.init(this@Main2Activity)

    // Obtain the SciChartBuilder instance
    val sciChartBuilder = SciChartBuilder.instance()

    val myCustomFont: Typeface? = ResourcesCompat.getFont(this, R.font.maryam)
    val fontStyle = FontStyle(myCustomFont, 50f, Color.RED)

    val s = String("محور".toByteArray(Charsets.UTF_8))

    xAxis = sciChartBuilder.newNumericAxis().withAxisTitleStyle(fontStyle).withAxisTitle(s).withGrowBy(DoubleRange(0.1, 0.1)).build()
    yAxis = sciChartBuilder.newNumericAxis().withAxisTitle("this is y").withGrowBy(DoubleRange(0.1, 0.1)).build()

    val dataSeries = XyDataSeries(Double::class.javaObjectType, Double::class.javaObjectType)
    dataSeries.append(arrayOf(0.0, 2.0, 4.0, 6.0, 8.0, 10.0), arrayOf(1.0, 5.0, -5.0, -10.0, 10.0, 3.0))

    rs = sciChartBuilder.newColumnSeries()
            .withDataSeries(dataSeries)
            .withStrokeStyle(ColorUtil.White, 3f, false)
            .build()

    surface.chartModifiers.add(sciChartBuilder.newModifierGroupWithDefaultModifiers().build())

    UpdateSuspender.using(surface) {
        Collections.addAll<IAxis>(surface.xAxes, xAxis)
        Collections.addAll<IAxis>(surface.yAxes, yAxis)
        Collections.addAll<FastColumnRenderableSeries>(surface.renderableSeries, rs)

    }

and the result :

result image

0 votes
89 views

Hello, I’m trailing your library right now. I would like to be able to move the graph around as well as a cursor on the graph. So I enabled both SCIZoomPanModifier and SCICursorModifier. But since both use one finger panning, the result wasn’t that good. Do you have any guidance for solving the conflict and letting them working together? I’m thinking to do it in the following way: if the touch location is within certain pixel range of the cursor, panning action will move the cursor, otherwise it moves the graph. Is it possible? Thanks

  • Haoran Xie asked 1 month ago
  • last active 1 month ago
0 votes
84 views

Hello, I’m trailing your library right now. I’m wondering how to change the background color of the legend box. The document page for LegendModifier shows coming soon. I don’t see such option in LegendModifier definition in Xcode either. Thanks

  • Haoran Xie asked 1 month ago
  • last active 1 month ago
0 votes
80 views

I have created a SciChartSurface with a ColumnSeries. I update the series data every second with new values. I have turned on GPU profiling in Android developer options. After running the application I get the image shown in the attachment “SciChart_noCursor”. There are no new columns from the profiler drawn on each update of the chart’s data series. However when I add a VerticalLineAnnonation (which I use as a cursor) I get the image shown in the attachment “SciChart_withCursor”. On every update of the chart’s data series, the SciChartSurface is remeasured and redrawn and a lot of the frames take longer than 16.6 ms to redraw. I have also attached the source code of my example project.

My question is, is there a way to have a cursor line that won’t cause the whole surface to redraw on every update? In my production code I update the chart’s data 5 times per second and I have a much more complex layout. And causing layout measure on SciChartSurface is causing lots of janky frames. The reason I used a vertical line annotation as cursor is because I have have cursor info drawn outside of the SciChartSurface in my own TextView and with the built in cursor I wasn’t able to achieve that.

0 votes
96 views

We’d like to customize the look of our legends. We have 4 legends displaying different data, but right now the only thing we can change is the Theme. Is there any way to customize the legend items, like add some icons, change the point marker shape and size, change the check box icon etc…

P.S.: I’m not a trial user. We have an iOS, Android and WPF licenses purchased.

Project info:
Xamarin.Android
SciChart.Android 2.2.2.854

Version
2.2.2.854

1 vote
115 views

We’d like to customize the look of our legends. We have 4 legends displaying different data, but right now the only thing we can change is the Theme. Is there any way to customize the legend items, like add some icons, change the point marker shape and size, change the check box icon etc…

P.S.: I’m not a trial user. We have an iOS, Android and WPF licenses purchased.

Project info:
Xamarin.iOS
SciChart.iOS 2.2.2.854

0 votes
86 views

Andrew required swift code so I attach the code.
Please answer my question again.

https://www.scichart.com/questions/question/customize-chart-designwith-pic
https://www.scichart.com/questions/question/cannnot-remove-weird-square-areas

Andrew answered second question, but it didn’t work.
There is no drawAxisBands.

  • Minsub Kim asked 1 month ago
  • last active 1 month ago
0 votes
112 views

I have a simple line renderable series in iOS with an SCIDateTimeAxis for X and an SCINumericAxis for Y. At this point all I’m trying to do is format the Y-axis labels and cursor labels as currency. According to the documentation, this should be as simple as:

yAxis.textFormatting = "$%f"

But it does not appear to properly use this formatting. The Y-axis is showing values like “$%f1400” when formatting a value for 14.

So, I instead attempted creating my own label provider by overriding SCINumericLabelProvider:

class CurrencyLabelProvider: SCINumericLabelProvider {

static let formatter: NumberFormatter = {
    let formatter = NumberFormatter()
    formatter.numberStyle = .currency
    return formatter
}()

override func formatLabel(_ dataValue: SCIGenericType) -> NSAttributedString! {
    let value = dataValue.doubleData
    let string = CurrencyLabelProvider.formatter.string(from: NSNumber(value: value))!
    return NSAttributedString(string: string)
}
}

Then assigning:

yAxis.labelProvider = CurrencyLabelProvider()

This works to properly format the axis labels. So, I also override SCINumericLabelProvider to provide the cursor labels:

 override func formatCursorLabel(_ dataValue: SCIGenericType) -> NSAttributedString! {
    let value = dataValue.doubleData
    let string = CurrencyLabelFormatter.formatter.string(from: NSNumber(value: value))!
    return NSAttributedString(string: string)
}

This then properly formats the cursor label for the Y-axis- but it also formats the X-axis cursor:
Formatted Cursor

At this point, the X-axis is already assigned an SCIDateTimeLabelProvider- the X-axis is not assigned CurrencyLabelProvider. But it seems to be overridden by the Y-axis label provider or simply unused. The X-axis labels are formatted as dates properly, but X-axis cursor values are just numbers when not being interfered with by the Y-axis label provider.

Am I misunderstanding something or are these all bugs in the iOS SDK? We’re currently evaluating whether this package will meet our needs and it certainly appears to be riddled with issues.

  • Sean Young asked 1 month ago
  • last active 1 month ago
0 votes
84 views

I am trying to add a VerticalLineAnnotation with a text at the bottom to my SciChart graph.

The similar thing works great when the XAxis is a NumericalAxis, but throws an Exception when it is a TimeSpanAxis.

var commentAnnotation = new VerticalLineAnnotationViewModel()
{
    // Setting the LabelValue only works when the XAxis is a NumericalAxis
    // and throws an Exception when it is a TimeSpanAxis
    LabelValue = "vertical line annotation",
    ShowLabel = true,
    // adjust this to '9' when trying it with a NumericalAxis
    X1 = TimeSpan.FromHours(9),
};
AnnotationViewModels.Add(commentAnnotation);

My SciChartSurface looks like this:

<s:SciChartSurface Annotations="{s:AnnotationsBinding AnnotationViewModels}">
    <s:SciChartSurface.XAxis>
        <s:TimeSpanAxis>
            <s:TimeSpanAxis.VisibleRange>
                <s:TimeSpanRange Min="00:00:00" Max="10:00:00" />
            </s:TimeSpanAxis.VisibleRange>
        </s:TimeSpanAxis>
    </s:SciChartSurface.XAxis>
</s:SciChartSurface>
0 votes
0 answers
98 views

Please see attached. My UI with SciChart and then the byte[] using ExportToBitmap() that is displayed on a Crystal Report. Is this a SciChart issue? My reports guy is not in today and I’m concerned that it could be a SciChart issue, but it could very well be Crystal Reports as well. Anyone seen anything like this before?

0 votes
96 views

Hi

Is it possible to achieve an effect like shown on the attached image – where the background color of the chart changes over time?

/Flemming Rosenbrandt

0 votes
91 views

Hi,

We have the WPF 2D version.

We have bound the VisibleRange on both X and Y axes to our viewmodel.
A combo-box selection triggers the OnPropertyChanged which will assign a default range depending on the type of data we want to display.
We also have allowed for the user to drag the axes and adjust the ranges as desired.

This all works as we’d expect, until the user does a manual adjustment, then the binding to the combo-box seems to be broken (the default ranges we set for the given data no longer update the X and Y axes).

0 votes
104 views

registerVisibleRangeChangedCallback is not enough for me.
I want an active stop function like this.
surface.stopScroll()….

  • Minsub Kim asked 1 month ago
  • last active 1 month ago
Showing 1 - 50 of 2k results