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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0 votes
51 views

I have a question about the scichart performance. I need to display a lot of data on the real time chart and above 2400000 values the chart crops and reacts very slowly. It was tested on Samsung s7. Does scichart handle that much data on devices? Is there any minimum phone performance requirements?

  • al luk asked 7 days ago
  • last active 5 days ago
0 votes
45 views

Hi,

Let me explain the structure of attached views. Default view state is https://imgur.com/a/zqAqpXp .

<VerticalViewPager>
    <FirstPagedFragment>
         <TradingViewFragment>
             <WebView />
         </TradingViewFragment>
         <SciChartFragment>
             <com.scichart.charting.visuals.SciChartSurface />
         </SciChartFragment>
    </FirstPagedFragment>
    <SecondPagedFragment> 
           ... 
    </ SecondPagedFragment>
</VerticalViewPager>

When FirstPagedFragment is dragged, SecondPagedFragment becomes displayed. You can see it on https://imgur.com/a/2VqZ1HY

The problem is the chart becomes disappeared when ViewPager is on changing state. Here is another link : https://imgur.com/a/xDO6Xtx

It is happened on [Samsung Galaxy S9, API 26] and [Xiaomi Mi A1, API 25] and I did not update displayMetric of chart.
Is there any configuration to fix this issue? Thanks.

All images are attached.

0 votes
40 views

Hi,

When I did some practices with your example app, I found some features does not work as I expected.
Here is CandlestickChartFragment.java and I wrote additional lines on xAxis builder, yAxis builder and surface.chartModifiers,

public class CandlestickChartFragment extends ExampleBaseFragment {
    @BindView(R.id.chart)
    SciChartSurface surface;

    @Override
    protected int getLayoutId() {
        return R.layout.example_single_chart_fragment;
    }

    @Override
    protected void initExample() {
        PriceSeries priceSeries = DataManager.getInstance().getPriceDataIndu(getActivity());
        int size = priceSeries.size();

        final IAxis xAxis = sciChartBuilder.newCategoryDateAxis()
            .withVisibleRange(size - 30, size)
            .withGrowBy(0, 0.1)
            // Start additional lines
            .withAutoFitMarginalLabels(false)
            .withTextFormatting("yyyy-MM-dd")
            .withCursorTextFormating("MM-dd")
            // End additional lines
            .build();
        final IAxis yAxis = sciChartBuilder.newNumericAxis()
            // Start additional lines
            .withAutoFitMarginalLabels(false)
            .withTextFormatting("$ #.#")
            .withCursorTextFormating("#.#")
            // End additional lines
            .withGrowBy(0d, 0.1d)
            .withAutoRangeMode(AutoRange.Always)
            .build();

        IOhlcDataSeries<Date, Double> dataSeries = new OhlcDataSeries<>(Date.class, Double.class);
        dataSeries.append(priceSeries.getDateData(), priceSeries.getOpenData(), priceSeries.getHighData(), priceSeries.getLowData(), priceSeries.getCloseData());

        final FastCandlestickRenderableSeries rSeries = sciChartBuilder.newCandlestickSeries()
                .withStrokeUp(0xFF00AA00)
                .withFillUpColor(0x8800AA00)
                .withStrokeDown(0xFFFF0000)
                .withFillDownColor(0x88FF0000)
                .withDataSeries(dataSeries)
                .build();

        UpdateSuspender.using(surface, new Runnable() {
            @Override
            public void run() {
                Collections.addAll(surface.getXAxes(), xAxis);
                Collections.addAll(surface.getYAxes(), yAxis);
                Collections.addAll(surface.getRenderableSeries(), rSeries);
                Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers()
                    // Start additional lines
                    .withCursorModifier().withShowAxisLabels(true).withShowTooltip(true).build()
                    // End additional lines
                    .build());

                sciChartBuilder.newAnimator(rSeries).withWaveTransformation().withInterpolator(new DecelerateInterpolator()).withDuration(3000).withStartDelay(350).start();
            }
        });
    }
}

The result is below picture. I also attached the same image.
https://imgur.com/a/5Eqo8Gd
Displayed xAxis values are [27 Sep, 04 Oct, 11 Oct, 18 Oct, 25 Oct, 01 Nov].

The problems are
1. xAxis(CategoryDate) tick values should be started with year, even though it does not have enough margin. It looks updated format is not applied.
2. Cursor should be shown on touch event, but it does not be displayed at all.

I ran above code on [Samsung Galaxy S9, API 26] and [Xiaomi Mi A1, API 25] and same problems are happened.

Could I know what I missed?

0 votes
41 views

Dear Support, I have SciChartSurface in fragment (Xamarin Android). I added Xaxis (DateAxis), Yaxis (NumericAxis), standard modifiers and few XyDataSeries as FastLineRenderableSeries. Everything is working fine (screenshot 1). But something strange is happen when fragment with chart is Paused -> Stopped and then Started -> Resumed. Xaxis and Yaxis are not visible. All dataseries are not visible. But I debugged and all data is there. Even rolloverModifier is still working and correct data values are displayed in labels (screenshot 2). It does not happen every time – it depends on what external intent stopped fragment.

I’ve tried reinitialize chart (clear Xaxis, Yaxis, remove modifiers, remove renderableSeries are reinit all with new variables) and it does not help. Only fragment dettach -> attach helps or screen orientantion change (it reinitializes fragment)

Could you tell me any suggestion what can I check or how to force to redraw whole SciChartSurface? (hiding it and showing it does not help – effect is the same. Only fragment dettach and attach helps (this is my workaround at the moment).

0 votes
42 views

I have some complex data & am showing each dataset as a different colour, but I would like to be able to customise the legends.

I am interested in having 2 legends, one with each data set, showing the colour, and preferably, limited to a set number with the option to scroll, and the other showing that solid lines are the left Y axis, and the dashed lines are the right Y axis.

My question is, is there a way to apply a custom skin to the Legend & is there a way to show dashed lines instead of just a big coloured square in the legend?

0 votes
37 views

Hi,

I was looking at some examples and one thing caught my eye. In the example below

Android Line Chart

the graph appears smooth around the surface(appears to be a spline curve) but when I tried to implement the same the smoothness is gone(appears as a normal curve). Any apparent reason why this is happening.

0 votes
36 views

Hi,

I wanted to implement a custom delta provider for a numeric axis but there is no way to set the delta provider for the numeric axis. Please advice

Note : I want to change the number of ticks shown based on visible range. My visible range is dynamic.

0 votes
31 views

Hello, I’m using rollover modifier. By default data label is in first line, and data value is in second line. How can I modify it to have label and value in single line?

0 votes
73 views

Hi,

I have a question as to whether it is possible to draw major gridlines to end at the renderSeries surface. Something similar to the attached image.

0 votes
64 views

Hi,

I am trying to add labels to the x axis but I don’t want the axis line to be visible. numericAxis.drawLabels = true enables the x axis line also. Is there a way to disable it?

0 votes
557 views

Quick example. All charts visible:

enter image description here

Setting Visibility.GONE to RSI chart:

enter image description here

As you can see part of RSI chart is now visible on MACD chart.

Here is my layout. I want to be able to hide any of the charts inside LinearLayout and the remaining charts should equally fill the newly created space. I wasn’t able to recreate the desired behaviour with ConstraintLayout, otherwise I would use it.

<com.scichart.charting.visuals.SciChartSurface
        android:id="@+id/priceChart"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />

    <LinearLayout
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:layout_height="0dp"
        android:layout_weight="1">

        <com.scichart.charting.visuals.SciChartSurface
            android:id="@+id/macdChart"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"/>

        <com.scichart.charting.visuals.SciChartSurface
            android:id="@+id/rsiChart"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"/>

        <com.scichart.charting.visuals.SciChartSurface
            android:id="@+id/volumeChart"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"/>
    </LinearLayout>
  • Primoz asked 3 weeks ago
  • last active 3 weeks ago
0 votes
624 views

Hi there,

I’am using your example that name is SyncMultipleChartsFragment.
I want to share pinch zoom modifier all other charts. Your example provides “ModifiersSharedEventsGroup” . When zooming on chart other charts handle this zoom operation. In this case, fingers are just in a chart.
How can I make a finger zoom on 1 chart while the other finger is on a different chart.

Below I’am sharing a video about this problem.
Link of video : https://drive.google.com/file/d/1u42p9-vEQNxPzN56jF3QOjZIVUlOyyXx/view

Thank you very much,
Have a good day,

0 votes
561 views

Hi, I’m using scichart to implement a blood pressure chart. But I have to worry about not being able to implement additional features.

What you want to implement is

Using RolloverModifier and onTouchEvent, we need to draw a vertical bar using the canvas class by getting the coordinates of the first checking point at the end of the scroll and the second checking point at the end of the second

However, onTouch does not match the value given by RolloverModifier Tooltip when using montionvent.getX ().

I have been suffering for over a week because of the problem. Please help me.

  • Kim young asked 1 month ago
  • last active 4 weeks ago
0 votes
828 views

Hi,

I am showing multiple chats in multiple pages in a loop viewPager but the license key is not recognised in some pages. This happens with no particular pattern to it. It sometimes disappears when I relaunch the app. Then again if I do the same it reappears.

0 votes
563 views

Hi,

I see there is spline interpolation for WPF https://www.scichart.com/documentation/v5.x/Spline%20Interpolation%20Filters.html is there a timeline for introducing this in the Android platform?

0 votes
617 views

hi,
I am currently trying to implement a chart with a category datetime axis. I custom a label formatter for handling a custom datetime format, let say”yyyy/MM”. Only the 1st tick of each year will display the label.
Eg: data with[“2018/1”,“2018/3”,“2018/5”], only show 2018/1, others show with empty/no label

I find the overrided method of label and cursor label formatter have only returned Comparable object which should be only returned the current rederering datetime axis label’s date.
Is there any way to find the previous one label to compare or any suggestion for implement this axis? Thank you!

  • may lym asked 1 month ago
  • last active 1 month ago
0 votes
645 views

Hi,

I am following this https://www.scichart.com/example/android-chart-custom-series-spline-line/ to implement spline for a realtime mountain series but the thing is the render series is shown for an instant and then disappears. And also I am not able to get the areaStyle to work. Please advice.

import android.content.Context
import android.util.DisplayMetrics
import com.scichart.charting.model.dataSeries.IDataSeries
import com.scichart.charting.visuals.pointmarkers.IPointMarker
import com.scichart.charting.visuals.renderableSeries.BaseMountainRenderableSeries
import com.scichart.charting.visuals.renderableSeries.ISeriesDrawingManager
import com.scichart.charting.visuals.renderableSeries.data.ISeriesRenderPassData
import com.scichart.charting.visuals.renderableSeries.data.MountainRenderPassData
import com.scichart.charting.visuals.renderableSeries.hitTest.*
import com.scichart.core.framework.SmartPropertyBoolean
import com.scichart.core.framework.SmartPropertyInteger
import com.scichart.core.model.FloatValues
import com.scichart.core.utility.SciChartDebugLogger
import com.scichart.drawing.common.DrawingContextFactory
import com.scichart.drawing.common.IAssetManager2D
import com.scichart.drawing.common.IRenderContext2D
import com.scichart.drawing.common.LinearGradientBrushStyle
import com.scichart.extensions.builders.PenStyleBuilder.SolidPenStyleBuilder

class BezelMountainSeries(currentRenderPassData: MountainRenderPassData, hitProvider: IHitProvider, nearestPointProvider: INearestPointProvider) :  
BaseMountainRenderableSeries(currentRenderPassData, hitProvider, nearestPointProvider) {

protected val isSplineEnabledProperty = SmartPropertyBoolean(SmartPropertyBoolean.IPropertyChangeListener { oldValue, newValue -> invalidateElement() }, true)

protected val upSampleFactorProperty = SmartPropertyInteger(SmartPropertyInteger.IPropertyChangeListener { oldValue, newValue -> invalidateElement() }, 10)

private val splineXCoords = FloatValues()
private val splineYCoords = FloatValues()

var isSplineEnabled: Boolean
    get() = isSplineEnabledProperty.value
    set(isSplineEnabled) = isSplineEnabledProperty.setStrongValue(isSplineEnabled)

var upSampleFactor: Int
    get() = upSampleFactorProperty.value
    set(upSampleFactor) = upSampleFactorProperty.setStrongValue(upSampleFactor)

init {

    seriesInfoProvider = LerpXySeriesInfoProvider()
}

override fun disposeCachedData() {
    super.disposeCachedData()

    splineXCoords.disposeItems()
    splineYCoords.disposeItems()
}

override fun internalDraw(renderContext: IRenderContext2D, assetManager: IAssetManager2D, renderPassData: ISeriesRenderPassData) {
    // Don't draw transparent series
    val opacity = opacity
    if (opacity == 0f) return

    val strokeStyle = strokeStyle
    if (strokeStyle == null || !strokeStyle.isVisible) return

    val currentRenderPassData = renderPassData as MountainRenderPassData

    computeSplineSeries(splineXCoords, splineYCoords, currentRenderPassData, isSplineEnabled, upSampleFactor)

    val linesStripDrawingContext = DrawingContextFactory.LINES_STRIP_DRAWING_CONTEXT

    val pen = assetManager.createPen(strokeStyle, opacity)

    val digitalLine = currentRenderPassData.isDigitalLine
    val closeGaps = currentRenderPassData.closeGaps

    val drawingManager = services.getService(ISeriesDrawingManager::class.java)
    drawingManager.beginDraw(renderContext, currentRenderPassData)

    drawingManager.iterateLines(linesStripDrawingContext, pen, splineXCoords, splineYCoords, digitalLine, closeGaps)

    drawingManager.endDraw()

    drawPointMarkers(renderContext, assetManager, currentRenderPassData.xCoords, currentRenderPassData.yCoords)
}

/**
 * Cubic Spline interpolation: http://www.codeproject.com/Articles/560163/Csharp-Cubic-Spline-Interpolation
 */
private fun computeSplineSeries(splineXCoords: FloatValues, splineYCoords: FloatValues, currentRenderPassData: MountainRenderPassData, isSplineEnabled: Boolean, upSampleFactor: Int) {
    if (!isSplineEnabled) return

    // Spline enabled
    val size = currentRenderPassData.pointsCount()
    val splineSize = size * 5

    splineXCoords.setSize(splineSize)
    splineYCoords.setSize(splineSize)

    val x = currentRenderPassData.xCoords.itemsArray
    val y = currentRenderPassData.yCoords.itemsArray

    val xs = splineXCoords.itemsArray
    val stepSize = (x[size - 1] - x[0]) / (splineSize - 1)

    // set spline xCo-ordinates
    for (i in 0 until splineSize) {
        xs[i] = x[0] + i * stepSize
    }
    var ys = FloatArray(0)

    try {
        val cubicSpline = CubicSpline()
        ys = cubicSpline.fitAndEval(x, y, size, xs, java.lang.Float.NaN, java.lang.Float.NaN, true)
    } catch (e: Exception) {
        SciChartDebugLogger.instance().handleException(e)
    }

    // copy spline yCo-ordinates
    System.arraycopy(ys, 0, splineYCoords.itemsArray, 0, splineSize)
}

class BezelMountainRenderableSeriesBuilder(context: Context) {
    private val displayMetrics: DisplayMetrics = context.resources.displayMetrics
    private val renderableSeries: BezelMountainSeries = BezelMountainSeries(MountainRenderPassData(), CompositeHitProvider(PointMarkerHitProvider(), MountainHitProvider()), NearestXyPointProvider())

    fun withDataSeries(dataSeries: IDataSeries<*, *>): BezelMountainRenderableSeriesBuilder {
        renderableSeries.dataSeries = dataSeries
        return this
    }

    fun withStrokeStyle(seriesColor: Int, strokeThickness: Float, antiAliasing: Boolean): BezelMountainRenderableSeriesBuilder {
        renderableSeries.strokeStyle = SolidPenStyleBuilder(displayMetrics).withThickness(strokeThickness).withColor(seriesColor).withAntiAliasing(antiAliasing).build()
        return this
    }

    fun withAreaStyle(x0 : Float, y0 : Float, x1 : Float , y1 : Float, startColor : Int , endColor : Int) : BezelMountainRenderableSeriesBuilder {
        renderableSeries.areaStyle = LinearGradientBrushStyle(x0, y0, x1, y1, startColor, endColor)
        return this
    }

    fun withPointMarker(pointMarker: IPointMarker): BezelMountainRenderableSeriesBuilder {
        renderableSeries.pointMarker = pointMarker
        return this
    }

    fun withUpSampleFactor(upSampleFactor: Int): BezelMountainRenderableSeriesBuilder {
        this.renderableSeries.upSampleFactor = upSampleFactor
        return this
    }

    fun withIsSplineEnabled(isSplineEnabled: Boolean): BezelMountainRenderableSeriesBuilder {
        this.renderableSeries.isSplineEnabled = isSplineEnabled
        return this
    }

    fun build(): BezelMountainSeries {
        return renderableSeries
    }
}

}

The CubicSpline and TriDiagonalMatrixF implementation are the same as the example with no alterations.

0 votes
595 views

Hi, I am trying to make a graph using the mountain series and I have allocated some padding to the y axis using the growBy and have the series filled using areaStyle but the issue is the area bellow the padding doesn’t get filled and it looks weird where the graph looks half filled because of the padding. Is there a way to fill the area of the padding using the areaStyle or something similar ignoring the growBy padding.

0 votes
662 views

Hi,

I was following https://www.scichart.com/example/android-chart-custom-series-spline-line/ to implement a custom bezel curve. This works fine for static datasets but when I append values to the datasets they are not getting reflected (i.e has no effect on realtime datasets). Is there something that I am missing?

0 votes
662 views

Hi,

I have a line chart and I want to colour the space bellow the line chart with a colour that is different form the background colour. I am not sure what API does that. Please advice.

0 votes
664 views

Hello,
I want to zoom at graph but without generating new 5×5 cubes in background. Is there a way how to do it?

0 votes
682 views

I would like to show data in a Heatmap chart where xAxis represents time. I would also like to keep adding data in the x direction. I have been told that Heatmap does not support resizing of it’s DataSeries, so I decided to have a Heatmap of fixed size and to resample my data to the Heatmap’s size.

I have managed to resample my data and using a custom LabelProvider for the xAxis I have also managed to show the values on xAxis as dates. I got stuck at trying to animate the chart upon adding new data to the chart. The animation does not work correctly because the xAxis is always the same size since I resample the data and have a fixed size Heatmap.

My question is, how would I achieve what I desire with the available tools. Basically on every update of the zValues of DataSeries I would like to animate the ticks of the xAxis so that it would appear as though the dataSeries got points appended in the x direction.


An example of what I am trying to do.

The amount of data needed to be drawn is too big for SciChart Heatmap implementation so I decided to have a fixed size Heatmap. Lets say a Heatmap with width 100 and height 50. X axis represents time of the measurement. I have an ongoing measurement that produces data. On every measurement update I update the Heatmap. I resize the measurement data to make it 100 points in width and then update Z values on the DataSeries. This effectively appends data in the X direction.

What I would like is to animate the X axis to show that the data is being appended from the right. However, animating X axis’ visible range is not an option, since the Heatmap’s width is always 100. Which only leaves the tick marks themselves that could be animated to reflect what the chart is showing. That is data being appended from the right.

Hope this makes it clearer what I am trying to do 🙂

Thank you for all the help!

0 votes
0 answers
671 views

Hi,

I’m trying to draw graph in trial version for test purpose. But I cannot see graph in android 7.0(HD tablet). When I tried android 8.0(QHD phone), I can see graph with zoom in/out feature. I need to support android 7.0
I’m using ECG example.

I don’t know which is correct version. below is the setting in gradle.

implementation(group: ‘com.scichart.library’, name: ‘core’, version: ‘2.0.0.1654’, ext: ‘aar’)
implementation(group: ‘com.scichart.library’, name: ‘data’, version: ‘2.0.0.1654’, ext: ‘aar’)
implementation(group: ‘com.scichart.library’, name: ‘drawing’, version: ‘2.0.0.1654’, ext: ‘aar’)
implementation(group: ‘com.scichart.library’, name: ‘charting’, version: ‘2.0.0.1654’, ext: ‘aar’)
implementation(group: ‘com.scichart.library’, name: ‘extensions’, version: ‘2.0.0.1654’, ext: ‘aar’)

0 votes
690 views

I have created a HeatMap with the size of 25000 x 70. The application crashes with the following log:

E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
I/OpenGLRenderer: Initialized EGL, version 1.4
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without…
D/EGL_emulation: eglCreateContext: 0x7faef90b6500: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0x7faef90b6500: ver 2 0 (tinfo 0x7faf0489eec0)
D/EGL_emulation: eglMakeCurrent: 0x7faef90b6500: ver 2 0 (tinfo 0x7faf0489eec0)
D/EGL_emulation: eglCreateContext: 0x7faf04b65680: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0x7faf04b65680: ver 2 0 (tinfo 0x7faf04b7e500)
E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glTexImage2D:1908 GL error 0x501 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x41a10f90 in tid 2736 (GLThread 973)


Below is Kotlin code from my sample project that produces the error:

private const val WIDTH = 25000
private const val HEIGHT = 70

class MainActivity : AppCompatActivity()
{
    private lateinit var chartBuilder: SciChartBuilder

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

        SciChartSurface.setRuntimeLicenseKey(getString(R.string.sciChart_license))
        SciChartBuilder.init(this)
        chartBuilder = SciChartBuilder.instance()

        setContentView(R.layout.activity_main)
        val background = findViewById<ViewGroup>(R.id.background)

        val chartSurface = createChartSurface()
        background.addView(chartSurface)

        addPoints(chartSurface)
    }

    private fun createChartSurface(): SciChartSurface
    {
        val surface = SciChartSurface(this)

        val xAxis = chartBuilder.newNumericAxis().build()
        val yAxis = chartBuilder.newNumericAxis().build()

        surface.xAxes.add(xAxis)
        surface.yAxes.add(yAxis)

        surface.renderableSeries.add(createSeries(WIDTH, HEIGHT))

        return surface
    }

    private fun createSeries(width: Int, height: Int): FastUniformHeatmapRenderableSeries
    {
        val dataSeries = UniformHeatmapDataSeries(Int::class.javaObjectType, Int::class.javaObjectType, Float::class.javaObjectType, width, height)

        return chartBuilder.newUniformHeatmap()
            .withColorMap(ColorMap(intArrayOf(ColorUtil.DarkBlue, ColorUtil.CornflowerBlue, ColorUtil.DarkGreen, ColorUtil.Chartreuse, ColorUtil.Yellow, ColorUtil.Red), floatArrayOf(0f, 0.2f, 0.4f, 0.6f, 0.8f, 1f)))
            .withDataSeries(dataSeries)
            .build()
    }

    private fun addPoints(chartSurface: SciChartSurface)
    {
        @Suppress("UNCHECKED_CAST")
        val dataSeries = chartSurface.renderableSeries.first().dataSeries as UniformHeatmapDataSeries<Int, Int, Float>

        val xRange = 0 until WIDTH

        for (i in 0 until HEIGHT)
        {
            val values = xRange.map { (i + it).toFloat() }
            dataSeries.updateRangeZAt(0, i, values)
        }

        val renderableSeries = chartSurface.renderableSeries.first() as FastUniformHeatmapRenderableSeries
        renderableSeries.minimum = dataSeries.zValues.minimum.toDouble()
        renderableSeries.maximum = dataSeries.zValues.maximum.toDouble()
    }
}
0 votes
608 views

I’m building a custom NumericLabelProvider and need to change the label output based on the data the chart is displaying. We will be using the range of the chart to specify whether decimals display or not. How can I access the chart from my custom NumericLabelProvider?

0 votes
602 views

Is it possible to grow a UniformHeatmapDataSeries in the x direction? It only has methods to update the Z values. I have a case where X axis represents time and I need to keep adding values in X direction. Is there a way to do it besides recreating UniformHeatmapDataSeries with new values?

0 votes
686 views

Hi,
i am trying to create multiple Y Axis in my chart
1. Left side is showing Price Value, i.e. 1200, 1201…
2. Right side is showing the % change relative to certain price, i.e. 1%, 2%…
3. Both side label should be aligned so that 1200 1%, 1201 2% ….

Questions:
1. How to align the value on both Y Axis?
2. I want to assign multiple color to Y Axis, for example, blue for -ve value, red for +ve value, how to do that?

Thank you!

  • tommy ng asked 2 months ago
  • last active 2 months ago
0 votes
609 views

Hi,
I am developing a candle stick chart, with modifier newModifierGroupWithDefaultModifiers
What i want to do is
1. when user click the chart, the modifier will be changed to CursorModifier,
2. xy axis label should not disappeared when user release their finger

How could i do that?

Thank you

  • tommy ng asked 2 months ago
  • last active 2 months ago
0 votes
556 views

Hello,
I’m creating a chart where the x-axis are dates. I want to load more (past) data when a button is clicked or when the visible range satisfies some condition. I have been able to do that using the InsertData function with index = 0 (in order to insert in the beginning of the series), but my problem now is how to keep the position I had before inserting the new data. Right now, after the insertion, the x-axis visible range’s indexes are the same instead of being moved to the right in order to show the same part of the data as before.

I have tried different ways to modify the visible range (by moving the range taking into account the new data size) but none of them have performed well.

I would like to display the same before and after inserting the previous data, so when the user scrolls he can find more data on the left but he is shown the same range of data as before.

I’m using the CategoryDateAxis as x-axis and the NumericAxis as y-axis (you can see the configuration of those axis below). The renderable series is a FastCandlestickRenderableSeries and the data series is an OhlcDataSeries<DateTime, double>.

Btw, I’m using the Xamarin wrapper for Android.

Could you help me with this issue?

Thanks!

var yAxis = new NumericAxis(this.Context)
{
        GrowBy = new DoubleRange(0, 0.1),
        AutoRange = AutoRange.Always
};

var xAxis = new CategoryDateAxis(this.Context)
{
       GrowBy = new DoubleRange(0, 0.1),
       VisibleRange = new DoubleRange(dataCount - InitialCandlesShown, dataCount + RightCandlesMargin),
       VisibleRangeLimit = new DoubleRange(-2.0, dataCount + RightCandlesMargin),
       MinimalZoomConstrain = new Java.Lang.Double(MinimumCandlesShown)
 };
0 votes
640 views

Hi,
I want to customize the style of stick such that
1. Green and hollow stick if it is rising and open higher than close
2. Green and fill stick if it is rising and open lower than close
3. Red and hollow stick if it is falling and open higher than close
4. Red and fill stick if it is falling and open lower than close

How could i achieve that with only one candle series?

  • tommy ng asked 2 months ago
  • last active 2 months ago
0 votes
557 views

I tried to create a simple pie chart, but my app crashes with the following expection:

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.scichart.drawing.common.FontStyle.initPaint(android.graphics.Paint)' on a null object reference
    at com.scichart.charting.visuals.renderableSeries.PieDonutDrawingManagerBase.a(SourceFile:118)
    at com.scichart.charting.visuals.renderableSeries.PieDonutDrawingManagerBase.drawLabels(SourceFile:110)
    at com.scichart.charting.visuals.renderableSeries.PieRenderableSeries.internalDraw(SourceFile:70)
    at com.scichart.charting.visuals.renderableSeries.PieDonutRenderableSeriesBase.onDraw(SourceFile:560)
    at com.scichart.charting.visuals.c.onDraw(SourceFile:62)
    at android.view.View.draw(View.java:16178)

Here is my initialization code (Kotlin):

override fun onViewCreated(view: View, savedInstanceState: Bundle?)
{
    super.onViewCreated(view, savedInstanceState)

    val chartSurface = view.findViewById(R.id.chart)
    val builder = SciChartBuilder.instance()

    val pieSeries = builder
        .newPieSeries()
        .withSegments(builder
                          .newPieSegment()
                          .withValue(40.0)
                          .build(),
                      builder
                          .newPieSegment()
                          .withValue(20.0)
                          .build())
        .build()

    chartSurface.renderableSeries.add(pieSeries)
}

The SciPieChartSurface is inside a CardView inside a Constraintlayout if that could matter:

<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">   

    <android.support.v7.widget.CardView
        android:id="@+id/card_chart"
       android:layout_width="match_parent"
       android:layout_height="match_parent" >

        <com.scichart.charting.visuals.SciPieChartSurface
            android:id="@+id/chart"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    </android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>
0 votes
535 views

This issue repros on Android 4.4 API 19, but not API 27. It happens with the example project (Multi-Pane Stock Charts). The issue is that on certain zoom levels, the x-axis labels are cut off (so instead of displaying 11 Mar, it just displays 11).

I have tried to override TradeChartAxisLabelFormatter with my custom implementation but saw the same issue, so the bug seems to be in the provider or somewhere else.

Please see screenshot: https://imgur.com/a/2RDC2MZ

  • Mike Liu asked 2 months ago
  • last active 2 months ago
0 votes
521 views

When using GLTextureView on Android 4.4 API 19, there are a few issues. The same issue does not occur on API 27. Have not tested other API levels. If you do not use GLTextureView, this issue doesn’t happen (but due to theming bugs I have to use GLTextureView and not the other 2 types of render surfaces).

  1. If activity A has a SciChartSurface and activity B has a SciChartSurface and appears above activity A, then the surface in A dissapears (Shows blank) when you return to it. 100% repro for me. Let me know if you need more info.

  2. Due to 1? If you try to re-render the chart on activity A, it will lead to an ANR (app freezes indefinitely) after a few times (see below)

  3. Even if you don’t have activity B and only activity A, if you interact with it a few times and show/hide it, it will lead to an ANR (app freezes indefinitely) as well (see below):

ANR log (it freezes the app until you kill it):

09-03 13:01:40.583 1690-1705/system_process E/ActivityManager: ANR in co..stocks (co..stocks/.ui.screens.home.MainActivity)
PID: 12076
Reason: Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)
Load: 0.64 / 0.49 / 0.39
CPU usage from 6217ms to 779ms ago:

  • Mike Liu asked 2 months ago
  • last active 2 months ago
0 votes
550 views

I’m using a CategoryDateAxis and seeing the following crash many times in production. The issue is that SciChart is not synchronizing access to SimpleDateFormat, and this will lead to a crash.

Please see following thread for more details on how to fix this issue:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6231579

Crash log:

java.lang.ArrayIndexOutOfBoundsException: length=6; index=-4
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2411)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2321)
at java.util.Calendar.setTimeInMillis(Calendar.java:1787)
at java.util.Calendar.setTime(Calendar.java:1749)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:981)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
at java.text.DateFormat.format(DateFormat.java:341)
at com.scichart.charting.numerics.labelProviders.TradeChartAxisLabelFormatter.formatLabel(SourceFile:124)
at com.scichart.charting.numerics.labelProviders.FormatterLabelProviderBase.formatLabel(SourceFile:70)
at com.scichart.charting.numerics.labelProviders.CategoryLabelProviderBase.formatLabel(SourceFile:113)
at com.scichart.charting.visuals.axes.AxisBase.formatText(SourceFile:1142)
at com.scichart.charting.visuals.axes.AxisInfo.update(SourceFile:87)
at com.scichart.charting.visuals.axes.AxisTooltip.update(SourceFile:83)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.a(SourceFile:84)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.updateXAxisTooltip(SourceFile:62)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.a(SourceFile:165)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.onUpdate(SourceFile:158)
at com.scichart.charting.modifiers.TooltipModifierWithAxisLabelsBase.handleMasterTouchMoveEvent(SourceFile:190)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.a(SourceFile:129)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.execute(SourceFile:125)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.a(SourceFile:70)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.onTouchMove(SourceFile:59)
at com.scichart.charting.modifiers.TouchModifierBase.onTouch(SourceFile:44)
at com.scichart.charting.modifiers.ModifierGroup.onTouch(SourceFile:189)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1251)
at android.view.View.dispatchTouchEvent(View.java:11776)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2962)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2643)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
09-02 01:42:23.356 17621-17621/? E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
at android.app.Activity.dispatchTouchEvent(Activity.java:3307)
at android.support.v7.view.i.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at android.support.v7.view.i.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:12015)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4795)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4609)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6661)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6635)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6596)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6764)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:177)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6735)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6787)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:652)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
09-02 01:42:35.433 2145-2162/? E/BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}

Another crash:

java.lang.ArrayIndexOutOfBoundsException: length=13; index=15
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2411)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2321)
at java.util.Calendar.setTimeInMillis(Calendar.java:1787)
at java.util.Calendar.setTime(Calendar.java:1749)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:981)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
at java.text.DateFormat.format(DateFormat.java:341)
at com.scichart.charting.numerics.labelProviders.TradeChartAxisLabelFormatter.formatLabel(SourceFile:124)
at com.scichart.charting.numerics.labelProviders.FormatterLabelProviderBase.formatLabel(SourceFile:70)
at com.scichart.charting.numerics.labelProviders.CategoryLabelProviderBase.formatLabel(SourceFile:113)
at com.scichart.charting.visuals.axes.AxisBase.formatText(SourceFile:1142)
at com.scichart.charting.visuals.axes.AxisInfo.update(SourceFile:87)
at com.scichart.charting.visuals.axes.AxisTooltip.update(SourceFile:83)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.a(SourceFile:84)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.updateXAxisTooltip(SourceFile:62)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.a(SourceFile:165)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.onUpdate(SourceFile:158)
at com.scichart.charting.modifiers.TooltipModifierWithAxisLabelsBase.handleMasterTouchMoveEvent(SourceFile:190)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.a(SourceFile:129)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.execute(SourceFile:125)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.a(SourceFile:70)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.onTouchMove(SourceFile:59)
at com.scichart.charting.modifiers.TouchModifierBase.onTouch(SourceFile:44)
at com.scichart.charting.modifiers.ModifierGroup.onTouch(SourceFile:189)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1251)
at android.view.View.dispatchTouchEvent(View.java:11779)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2965)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2643)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
09-03 00:01:08.300 21932-21932/co.mikeliu.stocks E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1834)
at android.app.Activity.dispatchTouchEvent(Activity.java:3312)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:12018)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4829)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4643)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4234)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4327)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4208)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4384)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4234)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4208)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6755)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6694)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6655)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6858)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:193)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:184)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6829)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6881)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:652)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6545)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809)

  • Mike Liu asked 2 months ago
  • last active 2 months ago
0 votes
545 views

I see that this can be done on WPF (using ShowLicensingWarnings), but couldn’t find the property on Android. How can the licensing warning be hidden on Android?

  • Mike Liu asked 3 months ago
  • last active 3 months ago
0 votes
530 views

If you change the logarithmic Y axis to a regular NumericalAxis, the mountain series displays properly (with fill color).

  • Mike Liu asked 3 months ago
  • last active 3 months ago
0 votes
616 views

I’m seeing the following exception:

E/Exception: null
    java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
        at com.scichart.core.model.DoubleValues.get(SourceFile:167)
        at com.scichart.charting.numerics.tickProviders.LogarithmicNumericTickProvider.updateTicks(SourceFile:94)
        at com.scichart.charting.numerics.tickProviders.TickProvider.update(SourceFile:59)
        at com.scichart.charting.numerics.tickProviders.DeltaTickProvider.update(SourceFile:81)
        at com.scichart.charting.visuals.axes.AxisBase.onUpdateMeasure(SourceFile:957)
        at com.scichart.charting.visuals.axes.AxisBase.updateAxisMeasurements(SourceFile:936)
        at com.scichart.charting.layoutManagers.RightAlignmentOuterAxisLayoutStrategy.measureAxes(SourceFile:39)
        at com.scichart.charting.layoutManagers.DefaultLayoutManager.onLayoutChart(SourceFile:235)
        at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:207)
        at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:132)
        at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
        at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:234)
        at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:299)
        at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:283)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)

I’m initializing my chart as follows:

SciChartBuilder.init(context)
builder = SciChartBuilder.instance()

...

val xAxis = builder.newCategoryDateAxis()
                            .withGrowBy(0.0, 0.05)
                            .withAxisAlignment(AxisAlignment.Bottom)
                            .withVisibleRange(sharedXRange)
                            .withDrawMinorGridLines(true)
                            .withDrawMajorGridLines(true)
                            .build()
val yAxis = builder.newLogarithmicNumericAxis()
                            .withTextFormatting("#.#E+0")
                            .withScientificNotation(ScientificNotation.LogarithmicBase)
                            .withLogarithmicBase(2.0)
                            .build()
val seriesData = builder.newXyDataSeries(Date::class.java, Double::class.javaObjectType)
                            .withSeriesName("Series A")
                            .build()
seriesData.append(data.dateData, data.yData)
series = builder.newLineSeries()
                            .withDataSeries(seriesData)
                            .build()

UpdateSuspender.using(surface) {
                Collections.addAll(surface.xAxes, xAxis)
                Collections.addAll(surface.yAxes, yAxis)
                Collections.addAll(surface.renderableSeries, series)
}

data object has about 300 valid data points.

Any ideas what’s going on? I tried running this on a new activity. If I swap LogarithmicNumericAxis for a NumericAxis, everything works fine. I looked at the decompiled .class file where the crash was occurring (I don’t have the source for SciChart), and it seems like the crash occurs when major ticks fail to get generated (majorTicks.size == 0). I tried disabling all minor/major ticks but no joy.

for(int var22 = majorTicks.size(); var22 >= 0; --var22) {
            double var23 = var4.fromExponent(var11);
            double var25 = var22 < majorTicks.size() ? majorTicks.get(var22) : majorTicks.get(var22 - 1) * var23;
  • Mike Liu asked 3 months ago
  • last active 3 months ago
0 votes
514 views

Hi,

I’m evaluating SciChart for use in a production app.

Is there any way to log exceptions generated by SciChart? Currently I’m logging all handled and unhandled exceptions in my app to my server so that issues can be flagged without users having to manually submit support tickets. SciChart is printing internal exceptions to console – is there any way to override that with our own error handling mechanism? If not, how should we monitor for production errors generated internally by SciChart?

Thanks

  • Mike Liu asked 3 months ago
  • last active 3 months ago
0 votes
553 views

Hi,

I am using Sci chart library to plot the heart rate monitor graph.
I followed tutorials till 06 Tutorial and am able to draw graph with static data.
But as for plotting HRM graph I need, x axix to display current date and time and y-axix displaying BPM.

I tried to use ==>
final IAxis xAxis = sciChartBuilder.newDateAxis()
in my application , but when am executing it getting crashed.

Would anyone help how can I achieve this . Any help will be greatly appreciated.

Thanks,
Sushmita

1 vote
652 views

Hi

I have come across that Android Scichart consuming a lot of memory while drawing it on the surface. It increase more with the time. When i run the android memory profiler, i find out 60-65 % memory consumed by the Graphics only. The app getting started hangs after some time and become unresponsive. Please let me know how to improve the memory utilization.

0 votes
551 views

How to reduce size of colored rectangle of the legends ?

0 votes
563 views

Hi All
By default legends are being draw on scichart surface. I want to draw them outside the scichart surface because as the number of render-able series increase legends hides them. Please give me suggestion how do i do it ?

0 votes
565 views

can you please provide me source code (XML as well as Java) for the medical app. I have seen ECG example code but it is only for ECG. I want to show all parameters diplayed in pic.

0 votes
0 answers
542 views

Hi
By default legends are being draw on scichart surface. I want to draw them outside the scichart surface because as the number of render-able series increase legends hides them. Please give me suggestion how do i do it ?

0 votes
0 answers
597 views

I want to know whether the FastRenderableSeries is out of VisibleRange or not. I can’t check with getIsVisible() as it could be invisible by the legend.

0 votes
574 views

In my implementation I have the xAxis using a DateAxis in the dataset I am using there is only one data point.

The RolloverModifier is very sensitive it is very hard to highlight that one point.

RolloverModifier rolloverModifier = new VitalChartRolloverModifier();
rolloverModifier.setSourceMode(SourceMode.AllVisibleSeries);
rolloverModifier.setDrawVerticalLine(true);
rolloverModifier.setShowTooltip(true);
rolloverModifier.setShowAxisLabels(false);
rolloverModifier.setIsEnabled(true);
rolloverModifier.setUseInterpolation(false);

Is there a way of making it less sensitive?

1 vote
590 views

Hi I am implementing a chart on Android with 24 Hours of data viewable in 1, 2, 4, 8, 12 and 24 hours windows. The chart is drag-able upon the xAxis only. The full extent of the yAxis is always visible.

I am struggling to control the rate of scroll compared to the drag speed. What is desired is always a perceived one to one ratio of movement. This means that a data point’s movement distance when scrolled is the same is the point of touch’s movement distance regardless of zoom level.

I am currently using:

    ChartModifierCollection surfaceChartModifiers =  surface.getChartModifiers();
    XAxisDragModifier dragModifier = new XAxisDragModifier();
    dragModifier.setDragMode(AxisDragModifierBase.AxisDragMode.Pan);
    dragModifier.setClipModeX(ClipMode.ClipAtExtents);
    surfaceChartModifiers.add(dragModifier);

    ZoomPanModifier zoomPanModifier = new ZoomPanModifier();
    zoomPanModifier.setClipModeX(ClipMode.ClipAtExtents);
    zoomPanModifier.setDirection(Direction2D.XDirection);
    zoomPanModifier.setZoomExtentsY(false);
    surfaceChartModifiers.add(zoomPanModifier);

Currently however the ratio does not appear to be one to one the scrolling move further than the touch drag distance.

How can I achieve this?

0 votes
589 views

Thank you for your previous response however I would like to know how to recover the Date value from the AxisInfo parameter of the updateInternal method of the AxisToolTip class when used with a DateAxis.

To give context to the question. I am using a DateAxis for the xAxis on this chart and specifying a customised AxisInfoProvider as in the ‘CustomizationRolloverModifierTooltips’ example. When the RolloverModifier highlights some points and if ShowAxisLabels is true then the customised version of the updateInternal method of a customised AxisToolTip is called to to display the xAxis value on the axis.

The AxisInfo object contains a dataValue member variable the question then is: how to convert this back to a Date object.

1 vote
603 views

I am moving from MPAndroidChart to SciChart but I am also required to provide the same look and feel on the chart produced.

In this app the line chart has three lineCollections vertically offset from each other in MPAndroidChart i could use the charts getHighLighter().getHightLight(x, y) to retrieve a list of the three HighLighted points. This information is then used to display detailed information on those points in a popup panel not part of the chart.

Further to this the highLighting only happens after a longClick where the HigHlight Lines and the popup info panel then appear. Chart scrolling is also disabled. The popup info panel is then updated with the point information as the highlight moves.

Upon touchUp the highlight and popup info disappear and chart scrolling is then enabled.

The RolloverModifier appears to provide the required highlighting but I am confused on how to get the points currently highlighted.

0 votes
584 views

In ECG monitor example from where data is coming ?? If I want to send external sensor data to this example code what changes do i need to do ?? Please Help me

Showing 1 - 50 of 182 results