Pre loader

Tag: scichartandroid

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

-1 votes
0 answers
7k views

When we move the cursor fast in Sci Chart surface, Sometimes its making customized tooltip (cursor Modifier) to freeze. We are not having this issue in landscape mode. we have this issue only when we use it in half of fragment.

View hierarchy:
swipe refresh>
nested Scrollview>
constraint layout>
view> –50% of screen
Sci Graphview> –50% of screen
/ constraint layout>
/nested Scrollview>
/swipe refresh>

0 votes
6k views

Hi.
I have a line chart where i add data continuously from different sensors.
The code looks like this

protected open fun setupChart() {
    surface = requireView().findViewById(R.id.sciChartId)
    xAxis = NumericAxis(context).apply {
        autoRange = AutoRange.Always
        drawMajorGridLines = false
        drawMajorBands = false
        drawMinorGridLines = false
    }
    yAxis = NumericAxis(context).apply {

        drawMajorGridLines = false
        drawMajorBands = false
        drawMinorGridLines = false
        axisAlignment = AxisAlignment.Left
        // axisId ="First id"
    }
    dataSeries1 = XyDataSeries(Double::class.javaObjectType, Double::class.javaObjectType).apply {
        seriesName = "Line A"
        acceptsUnsortedData = true
    }

    val line1Color = Color.BLACK // ColorUtil.argb(0xFF, 0xFF, 0xFF, 0x00)

    val line1 = FastLineRenderableSeries().apply {
        strokeStyle = SolidPenStyle(line1Color, true, 1F, null)
        dataSeries = dataSeries1
        // yAxisId = "SecondId"
    }

    val legendModifier = LegendModifier(context).apply {
        setLegendPosition(Gravity.TOP or Gravity.START, 16)
        setOrientation(Orientation.VERTICAL)
        setSourceMode(SourceMode.AllSeries)
    }
    series.add(line1)

    UpdateSuspender.using(surface) {
        surface.xAxes.add(xAxis)
        surface.yAxes.add(yAxis)
        // surface.yAxes.add(yAxisTwo)
        surface.renderableSeries.addAll(series)
        surface.chartModifiers.add(legendModifier)
        surface.setBackgroundColor(Color.WHITE)

        series.forEach {
            AnimationsHelper.createAnimator(
                it,
                SweepXyTransformation(XyRenderPassData::class.java),
                3000,
                350,
                DecelerateInterpolator(),
                FloatEvaluator(),
                0f,
                1f
            ).start()
        }
    }

    addXAxisDragModifier()
    addZoomPanModifier()
    addZoomExtentModifier()
    addPinchZoom()
    surface.zoomExtents()
}

And the code adding data looks like this

dataSeries1.append(value, someOtherValue)

I understand that zooming is not possible when you set AutoRange to Always.
However i have not seen any working example where zooming is enabled at the same time as you add data continually.
Is it possible to zoom at all with real time without setting autoRange and if yes can you refer to any working example you have

  • Arbon Vata asked 2 years ago
  • last active 2 years ago
0 votes
12k views

Hello Friends,

I'm looking a solution where i can change Y-Axis range in between (0.1,0.2,0.4,0.6,0.8,1.0) .

I appreciate any help for above question

Thanks
Vasim

0 votes
6k views

https://www.dropbox.com/s/6f20scl1nyug1t7/chart_3.png?dl=0

Please see the link image. Can we have multiple y axis and one x-axis on android Line charts.. any example link will be useful and ready to purchase if supports these type of charts in Android

  • soujanya asked 5 years ago
  • last active 5 years ago
0 votes
6k views

Hi all,

Upfront apologies – I suspect this is a bit of a complicated set of information I’m looking for, as the UI specs are rather strict on what we’re looking for.

I’m getting to the last few functionalities I need to test, and I believe I’ve proof of concepted nearly everything I need. and I suspect I know what needs to be customized for my requirements. I wasn’t exactly sure how to implement some parts though, and the documentation for the android tick provider suggested that I look for assistance.

https://www.scichart.com/documentation/android/v2.x/webframe.html#Axis%20Ticks%20-%20TickProvider%20and%20DeltaCalculator%20API.html

My remaining goals are to have an X-axis that is…

  1. X-axis is above and below the top and bottom charts. I figure I can handle this dynamically by setting the axis visibility to true depending on which charts are visible – should be easy.

  2. X-axis needs to be on 1 hour ticks (on the hour). The zoom range will go from 3 hours to 72 hours, and I will limit the pan to the nearest hour prior and after the current data. I assume I need to override tick provider. The x axis should look like 12:00 AM, 1:00 AM, 2:00 AM, 3:00 AM, and so forth. If the zoom is at 72 hours, it’ll show something like 12:00AM, 3:00AM, etc. I don’t think this part needs to be customized, and will automatically be handled by the default delta provider (Unless I’m mistaken, I can just specify max number of ticks on screen somewhere, and it’ll handle accordingly). – This one seems rather complicated.

  3. I’d like to display the date on the 12:00AM entries of the x axis. As such, each “12:00 AM” tick will have “Jan 1” below it or the like. -Not sure how feasible this one is, and may push back on this requirement and skip it if it’s not doable.

Do you have an example of how to implement a custom tick provider/have any suggestions (also – please let me know if I’m barking up the wrong tree and I should be taking an entirely different approach).

Thanks!
-Andy

0 votes
9k views

Hello!

We are using SciChart in our Android application, and our Crashlytics reports that it crashes:

Fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 4581372 byte allocation with 8664 free bytes and 8KB until OOM
dalvik.system.VMRuntime.newNonMovableArray (VMRuntime.java)
android.graphics.Bitmap.createBitmap (Bitmap.java:727)
com.scichart.drawing.utility.BitmapUtil.createFrom (SourceFile:46)
com.scichart.drawing.opengl.aa. (SourceFile:113)
com.scichart.drawing.opengl.n.createTexture (SourceFile:130)
com.scichart.drawing.common.AssetManagerBase.createTexture (SourceFile:158)
com.scichart.charting.visuals.rendering.a.a (SourceFile:84)
com.scichart.charting.visuals.rendering.a.a (SourceFile:54)
com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.b (SourceFile:364)
com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a (SourceFile:357)
com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a (SourceFile:134)
com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw (SourceFile:123)
com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw (SourceFile:228)
com.scichart.drawing.opengl.MyGLRenderer.b (SourceFile:293)
com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame (SourceFile:277)
android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1548)
android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1259)

Can anyone help please?

0 votes
9k views

Hi,

I’m trying to wrap the Scichart surface in XF. I’ve used native views as recommended in documentation and there is no problem when the SciChartSurface is the only element in a ContentPage, but when the surface is placed inside a layout or merged with any other element, then is not rendering.

Do you know why is this happening and how can I merge XF controls and SciChartSurface(s) in a ContentPage or any Layout?

1: This is rendering without problem

    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:SciChartForms"
             xmlns:localAndroid="clr-namespace:SciChartForms.Droid"
             x:Class="SciChartForms.MainPage">
    <localAndroid:Stripchart />
</ContentPage>

2: This is not rendering:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:SciChartForms"
             xmlns:localAndroid="clr-namespace:SciChartForms.Droid"
             x:Class="SciChartForms.MainPage">
    <StackLayout Margin="20">
        <Button Text="adafsd"/>
        <localAndroid:Stripchart/>
    </StackLayout>
</ContentPage>

Thanks in advance!

PS: I’ve also tried with custom renderer obtaining the same result.

  • S C asked 6 years ago
  • last active 6 years ago
0 votes
12k views

Hello, I hope you can help me! please
How could you reach this special design with androidchar.
it’s possible?
Please I need to know if it is feasible, with this I could start to carry out my project.
Thanks in advance.

Showing 8 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies