Pre loader

Category: Android

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 vote
2k views

Hi.

We want to use your Android Chart library in our project. I’m getting familiar with it and I don’t totally gets how to implement Scrolling Realtime (FIFO) Line Chart.

What we want to do: our copmany wants an app that will represent the data on the line charts from their sensors. I need real-time (FIFO) representation from 1 to 16 charts in RecyclerView.

The guide here doesn’t cover the whole implementation (for example, we add data to XyDataSeries, but where to add these series to surface is not indicated). And link to github is not working also.

Do you have some example code or documentation regarding it?

0 votes
6k views

Hi Guys,

I am implementing the column chart, but the xAxis value is duplicate when I scroll the chart. Please see the images attachment.

Here are the piece of code, and wandering what cause this, thx!

package com.refinitiv.android.presentation.view.chart.stack

import android.content.Context
import android.util.AttributeSet
import android.view.Gravity
import android.widget.FrameLayout
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat

import com.scichart.charting.ClipMode
import com.scichart.charting.Direction2D
import com.scichart.charting.model.ChartModifierCollection
import com.scichart.charting.model.dataSeries.IXyDataSeries
import com.scichart.charting.modifiers.AxisDragModifierBase
import com.scichart.charting.modifiers.XAxisDragModifier
import com.scichart.charting.modifiers.ZoomPanModifier
import com.scichart.charting.numerics.labelProviders.NumericLabelFormatter
import com.scichart.charting.numerics.labelProviders.NumericLabelProvider
import com.scichart.charting.numerics.tickProviders.NumericTickProvider
import com.scichart.charting.visuals.SciChartSurface
import com.scichart.charting.visuals.axes.AutoRange
import com.scichart.charting.visuals.axes.AxisTickLabelStyle
import com.scichart.charting.visuals.axes.IAxis
import com.scichart.charting.visuals.renderableSeries.IRenderableSeries
import com.scichart.charting.visuals.renderableSeries.StackedColumnRenderableSeries
import com.scichart.charting.visuals.renderableSeries.VerticallyStackedColumnsCollection
import com.scichart.core.framework.UpdateSuspender
import com.scichart.core.model.DoubleValues
import com.scichart.core.model.IntegerValues
import com.scichart.data.model.DoubleRange
import com.scichart.drawing.canvas.RenderSurface
import com.scichart.drawing.common.FontStyle
import com.scichart.drawing.common.PenStyle
import com.scichart.drawing.common.SolidPenStyle
import com.scichart.extensions.builders.SciChartBuilder
import timber.log.Timber
import java.util.*
import kotlin.math.roundToInt

private const val GROW_BY: Double = 0.0

private const val MAX_VISIBLE_COLUMNS = 11
private const val MIN_VISIBLE = -0.5

class StackColumnChartView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int = 0,
defStyleRes: Int = 0
) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) {

private val chart = SciChartSurface(context)


private val typefaceSemibold =
    ResourcesCompat.getFont(context, R.font.proxima_nova_fin_semibold)

private val tickFontStyle = FontStyle(
    typefaceSemibold,
    resources.getDimension(R.dimen.chart_axis_text_size),
    getColorFromAttrOrDefault(R.attr.chartAxisTextColor, R.color.dove_grey),
    true
)

private val majorGridLineAndTickStyle: PenStyle = SolidPenStyle(
    getColorFromAttrOrDefault(R.attr.cardViewItemDividerBackground, R.color.desert_storm_50),
    true,
    resources.getDimension(R.dimen.chart_grid_line_thickness),
    null
)

var xAxisLabelList = emptyList<String>()
var yAxisLabelList = mutableListOf("0%", "20%", "40%", "60%", "80%", "100%")
var dataList: List<List<Double>> = emptyList()
private lateinit var xAxisData: List<Double>

init {
    chart.renderSurface = RenderSurface(context)
    val params = LayoutParams(
        LayoutParams.MATCH_PARENT,
        LayoutParams.MATCH_PARENT
    )
    chart.layoutParams = params

    addView(chart)
    chart.theme = R.style.SciChart
}

fun buildChart() {
    Timber.tag("CHART").d("CURVE CHART View build chart")
    SciChartBuilder.init(context)
    val sciChartBuilder: SciChartBuilder = SciChartBuilder.instance()
    xAxisData = xAxisLabelList.mapIndexed { index, _ ->
        index.toDouble()
    }
    val xAxis = initXAxis(sciChartBuilder)
    val yAxis = initYAxis(sciChartBuilder)
    val dataSeries = initDataSeries(context, sciChartBuilder)

    val surfaceChartModifiers: ChartModifierCollection = chart.chartModifiers
    val zoomPanModifier = ZoomPanModifier()
    zoomPanModifier.direction = Direction2D.XDirection
    zoomPanModifier.clipModeX = ClipMode.ClipAtExtents
    zoomPanModifier.clipModeY = ClipMode.None
    zoomPanModifier.zoomExtentsY = false

    val dragModifier = XAxisDragModifier()
    dragModifier.dragMode = AxisDragModifierBase.AxisDragMode.Pan
    surfaceChartModifiers.add(dragModifier)

    UpdateSuspender.using(chart) {
        chart.xAxes.clear()
        chart.yAxes.clear()
        chart.annotations.clear()
        chart.renderableSeries.clear()

        Collections.addAll(chart.xAxes, xAxis)
        Collections.addAll(chart.yAxes, yAxis)
        Collections.addAll(chart.renderableSeries, dataSeries)

        Collections.addAll(chart.chartModifiers, zoomPanModifier)
        Collections.addAll(chart.chartModifiers, dragModifier)
    }
}

fun clearChart() {
    UpdateSuspender.using(chart) {
        chart.xAxes.clear()
        chart.yAxes.clear()
        chart.annotations.clear()
        chart.renderableSeries.clear()
    }
}

private fun initDataSeries(
    context: Context, sciChartBuilder: SciChartBuilder
): IRenderableSeries {

    val verticalCollection = VerticallyStackedColumnsCollection()

    val seriesList = dataList.mapIndexed { _, xValue ->
        val series: IXyDataSeries<Double, Double> = sciChartBuilder.newXyDataSeries(
            Double::class.javaObjectType,
            Double::class.javaObjectType
        ).build()
        for (i in xAxisData.indices) {
            series.append(xAxisData[i], xValue[i])
        }
        series
    }


    val result = seriesList.mapIndexed { index, series ->
        val color: Int = if (index < colorList.size) {
            ContextCompat.getColor(context, colorList[index])
        } else {
            ContextCompat.getColor(context, colorList[index % colorList.size])
        }
        val stack: StackedColumnRenderableSeries =
            sciChartBuilder.newStackedColumn().withDataSeries(series).withFillColor(color)
                .withStrokeStyle(
                    ContextCompat.getColor(
                        context, R.color.chatline_white
                    ), 0.2F
                )
                .build()
        stack
    }

    verticalCollection.addAll(result)
    verticalCollection.dataPointWidth = 0.4
    verticalCollection.isOneHundredPercent = true
    return verticalCollection
}

private fun initXAxis(
    sciChartBuilder: SciChartBuilder
): IAxis {

    val horizontalAxisTickLabelStyle = AxisTickLabelStyle(
        Gravity.CENTER_VERTICAL,
        0,
        context.resources.getDimensionPixelSize(R.dimen.pe_firm_investment_profile_chat_view_label_margin_vertical),
        0,
        0,
    )
    val visibleMin = if (xAxisLabelList.size > MAX_VISIBLE_COLUMNS) {
        (xAxisLabelList.size - MAX_VISIBLE_COLUMNS).toDouble()
    } else {
        MIN_VISIBLE
    }
    val xVisibleRange = DoubleRange(visibleMin, (xAxisLabelList.size + MIN_VISIBLE))
    return sciChartBuilder
        .newNumericAxis()
        .build()
        .apply {
            axisTickLabelStyle = horizontalAxisTickLabelStyle
            tickLabelStyle = tickFontStyle
            drawMinorGridLines = false
            drawMinorTicks = false
            drawMajorTicks = false
            drawMajorBands = false
            drawMajorGridLines = false
            autoFitMarginalLabels = true
            visibleRange = xVisibleRange

// tickProvider = XTickProvider(xAxisData)
labelProvider =
NumericLabelProvider(FirmProfileDateAxisLabelFormatter(xAxisLabelList))
growBy = DoubleRange(GROW_BY, GROW_BY)
maxAutoTicks = xAxisLabelList.size
}
}

private fun initYAxis(
    sciChartBuilder: SciChartBuilder
): IAxis {
    val verticalAxisTickLabelStyle = AxisTickLabelStyle(
        Gravity.CENTER_HORIZONTAL,
        0,
        0,
        0,
        0
    )

    return sciChartBuilder
        .newNumericAxis()
        .build()
        .apply {
            axisTickLabelStyle = verticalAxisTickLabelStyle
            drawMajorGridLines = true
            minimalZoomConstrain = 0.0
            tickLabelStyle = tickFontStyle
            majorTickLineStyle = majorGridLineAndTickStyle
            majorGridLineStyle = majorGridLineAndTickStyle
            labelProvider = FirmProfileYAxisLabelProvider(yAxisLabelList)
            autoRange = AutoRange.Always
            maxAutoTicks = yAxisLabelList.size
            growBy = DoubleRange(GROW_BY, GROW_BY)
        }
}

fun dispose() {
    SciChartBuilder.dispose()
}

class XTickProvider(private val xAxisData: List<Double>) : NumericTickProvider() {
    override fun updateCullingPriorities(
        cullingPriorities: IntegerValues?,
        majorTicks: DoubleValues?
    ) {
        super.updateCullingPriorities(cullingPriorities, majorTicks)
    }
    override fun updateTicks(minorTicks: DoubleValues?, majorTicks: DoubleValues?) {

// super.updateTicks(minorTicks, majorTicks)
xAxisData.forEach {
majorTicks?.add(it)
}
}

    override fun getMajorTickIndex(tick: Double): Int {
        Timber.tag("StackColumn").v("getMajorTickIndex-:${tick}")
        return super.getMajorTickIndex(tick)
    }

    override fun shouldUpdateTicks(): Boolean {
       val should = super.shouldUpdateTicks()
        Timber.tag("StackColumn").v("shouldUpdateTicks-:${should}")
        return should
    }

    override fun isFirstMajorTickEven(majorTicks: DoubleValues?): Boolean {
        return super.isFirstMajorTickEven(majorTicks)
    }
}

class FirmProfileDateAxisLabelFormatter(private val labelTitles: List<String>) :
    NumericLabelFormatter() {

    private var lastFormatLabel = ""

    override fun formatLabel(p0: Double): CharSequence {
        Timber.tag("StackColumn").v("formatLabel-:${p0}")
        if (labelTitles[p0.toInt()] == lastFormatLabel) {
            return ""
        }
        return labelTitles[p0.toInt()]
    }

    override fun formatCursorLabel(p0: Double): CharSequence {

        return formatLabel(p0)
    }

}

class FirmProfileYAxisLabelProvider(private val labelList: List<String>) :
    NumericLabelProvider() {
    var index = 0
    override fun formatLabel(p0: Double): CharSequence {
        if (labelList.isEmpty()) {
            return ""
        }
        val title = labelList[index]
        index += 1
        index = if (index < labelList.size) {
            index
        } else {
            0
        }
        return title
    }

    override fun formatCursorLabel(p0: Double): CharSequence {
        return formatLabel(p0)
    }
}

companion object {
    val colorList = mutableListOf(
        R.color.chatline_blue_ribbon,
        R.color.chatline_black,
        R.color.chatline_teal,
        R.color.chatline_butterfly,
        R.color.chatline_olive,
        R.color.chatline_grenadier,
        R.color.chatline_rain_forest,
        R.color.chatline_cerise_red,
        R.color.chatline_scorpion,
        R.color.chatline_jelly_bean,
        R.color.chatline_genoa,
        R.color.chatline_brown_rust,
        R.color.chatline_torea_bay,
        R.color.chatline_saddle_brown,
        R.color.chatline_victoria,
        R.color.chatline_sherpa_blue,
        R.color.chatline_oregon,
        R.color.chatline_kaitoke_green,
        R.color.chatline_maroon_flush,
        R.color.chatline_tundora,
        R.color.chatline_chathams_blue,
        R.color.chatline_eden,
        R.color.chatline_mule_fawn,
    )
}

}

  • Steve Shan asked 2 years ago
  • last active 2 years ago
0 votes
0 answers
6k views

Hello, I am developing a finance application and I am using candlestick chart here. I also use moving average and various indicators together with the chart. As the data I have shown in the chart is updated, I reflect them on the screen. My chart and indicators are updated as new data comes in, but I cannot update the value and name data that I have shown on the top left side of the chart for the indicator. Every time the data is updated, I want to take the last value of the indicator along with my graph and indicators and update it in the top left part. How can I do that? I will share with you the code of the indicator creation and indicator creation parts that I have used for the moving average. At the same time, this problem exists not only for indicators, but also for graphs. The open, close, high, low data of the chart are not updated when they should be updated every time the data comes in. I’ve added a screenshot to better explain the problem.

0 votes
6k views

Hello, I was using version 4.2 before but I updated to version 4.4 last week. I am using candlestick chart in my project and show the chart in various time frames. These time periods include 1 day, 1 hour, 15 minutes, 1 minute and so on. Before the update to v4.4, when 1 time zone was selected, the example would show 09:00, 10:00, and on the 5 minute graph it would show as 09:00, 09:05, 09:10. After updating, it shows 09:00 instead of 09:05 when 5 minutes is selected, and 09:00 instead of 09:19 when 1 minute is selected. I want the date data that I added to the chart to be displayed as it is. I am also attaching screenshots for better understanding.
How can I fix this error I got? There is no problem with the data I have shown in the chart, it sounds as I want, but when I transfer it to the chart, it does not show as I want.

0 votes
6k views

Hello, I was using version 4.2 before, but today I updated to version 4.4. I was using the updateCurrentPoint function in the CustomRolloverModifier in my project, but this function has changed in version 4.3. How can I use the updateCurrentPoint function in version 4.4?

0 votes
6k views

Hello, I am a new developer who continues to develop scichart. In the currentPoint (or its name may be different) created after clicking in the developed application, the changes made on the graphic (changing the data, changing the graphic type, zooming in or out of the graphic, etc.), leaving these points where they are, breaks the graphic. In these cases, I need to either remove the point or make it move with the graph. how can I do that? I am developing with java. I uploaded the problem I encountered as a gif, you can understand it more clearly when you watch it.

1 vote
6k views

Hi. For example, I set yAxis VisibleRange(-100, 100), but I need to see only 3 gridlines: -100, 0 and 100. I cannot find how to remove other gridlines.

1 vote
6k views

Hello,
I was following the tutorial for building my first Chart for adroid.
I Download the newes version SciChart_ Android_v4.4.* and copy the lib in my FIles.
Since this went way to quick i opend the lib and it was empty, no .aar files.
I downloadet the adroid .zip again and still no .aar files in lib.
Then i downloadet the 4.3 version and there they are: aar files!

My Question: how do i get those files of the latest version?

0 votes
0 answers
6k views

Can I get a scroll offset of a chart and scroll a horizontal recycler simultaneously with the same offset?

0 votes
3k views

Hi,

When using splinerenderable series, there visual issues (as if the data points are unsorted) with the spline line at certain zoom levels.
If you zoom in past a certain point, the spline line corrects itself, showing that the data points are sorted in order.
See the attached screenshot and project replicating the issue.
This issue may be related to other issues currently active:

0 votes
0 answers
3k views

Hi,

Our current chart setup is as follows: 2 charts, each with 2 line series (~23k data points per line series – datetime [x-axis], double[y-axis]), data is added to the line series in real-time and all data is retained (never deleted). Both charts share a motion events group (pinchzoom, rollover, xaxisdrag, zoomextents).
Of the 2 Line series, each line series can be removed or added to the chart at random.

We noticed that an index out of bounds error occurs if you quickly add/remove a new line series (plus data) and start zooming in/out quickly, as much as possible. – easiest way to replicate issue. In some cases, if you zoom in with an already loaded lines series, the error still comes up.
See attached txt logs.

I considered completely disabling chart interaction (by disabling chart modifiers) before adding or removing a line series, however, this caused other issues such as vertical annotations being removed.

0 votes
6k views

Hi,

Our current chart setup is as follows: 2 charts, each with 2 line series (~23k data points per line series – datetime [x-axis], double[y-axis]), data is added to the line series in real-time and all data is retained (never deleted). Both charts share a motion events group (pinchzoom, rollover, xaxisdrag, zoomextents).

If you zoom in to the furthest zoom possible, the chart/app starts to act extremely sluggish, then crashes eventually. – see attached txt file for logs.

Questions:

  1. Is there a method to tackle this from a performance perspective and still enable zooming to the utmost limit?
  2. If 1.) is not possible, is it possible to enact a zoom limit on the charts?

Other solution suggestions are welcome.

0 votes
8k views

We are working on an android based ELD application. We are looking for a ELD graph. Is it possible to accomplish this using SCICHART?

0 votes
2k views

Is there an API of extension that would enable time-based average (e.g. average 10 minutes worth of data points) down-sampling of measurements?
Or is resorting to pre-filter provided data points the only option?

0 votes
2k views

I have a strange padding in the end of the chart. I set drawLabels false and added annotations to it. And added makerPoint for the last point. So everything is clipped by this padding.

You can see this on the screenshot in the attachment

0 votes
2k views

I want to format my labels after tapping a radio button. But the major labels with the “dd mm” pattern and the minor labels with the “HH:mm” pattern. If I check the radio button in the radio button group the labels will format with the others formats. It works with TradeChartAxisLabelProvider but I can’t handle it with my own formats. What I have to use?

0 votes
2k views

What is the best way to form List with my formatted dates in the View Model and just put in my implementation of CategoryLabelProviderBase?

Can an AxisBase implementation help me in this case?

0 votes
0 answers
6k views

I have a strange margin in the end of the chart. But AxisMarkerAnnotations don’t have this margin. Only series and HorizontalLineAnnotation. Look at the picture:

enter image description here

Where did it come from?

And maybe I can add margins to max and mix values?

0 votes
6k views

I am looking to customize the shape of the rollover vertical line (Android) – particularly, make it dashed and potentially increase the line thickness.
I saw that this is possible for WPF (https://www.scichart.com/questions/wpf/crosshair-cursormodifier-color-and-thickness), but was not able to find any information for Android.

Is this styling capable in Android?

0 votes
2k views

I have a chart and a radio button group. When I click a button an app will load new data. And it works ok. But sometimes my chart doesn’t scroll to start when data is changed. I changed visibleRange for it. It can be fixed with postDelayed method but is there any good way to fix it?

My code:

enter link description here

0 votes
2k views

I get an error when I scroll my chart. I didn’t change my code. It worked yesterday and it doesn’t today. I just started getting:

VisibleRange was restored to its last valid value. The range class com.scichart.data.model.DoubleRange (Min = 0.0, Max = 307.0) either is not valid or it doesn’t satisfy MinimalZoomConstrain or MaximumZoomConstrain. To provide fallback value please override AxisCore#coerceVisibleRange(IRange) method

I tried to make my MinimalZoomConstrain to zero and MaximumZoomConstrain to maximum. But it didn’t help me. I tried override coerceVisibleRange but I don’t kwon how

My code when chart points received in attachment

1 vote
0 answers
8k views

Hello there,
I am testing your 3D chart by creating single chart and adding multi data on condition.Whenever adding new data I clear previous.
surfaceCommon3D.getRenderableSeries().clear();
surfaceCommon3D.getChartModifiers().clear();

Issues is when first data add tooltip working properly and after adding new data then checking tooltip value Application will crash and show this error:
java.lang.ArrayIndexOutOfBoundsException: index
at com.scichart.core.model.DoubleValues.get(SourceFile:6)
at com.scichart.charting3d.visuals.renderableSeries.hitTest.MeshSeriesInfo3D.update(SourceFile:10)

here is my tooltip snippet code:
TooltipModifier3D t1 = new TooltipModifier3D();
t1.setReceiveHandledEvents(true);
t1.setExecuteOnPointerCount(1);
surfaceCommon3D.getChartModifiers().add(new ModifierGroup3D(t1));

SurfaceMeshRenderableSeries3D snippet code:
rs = sciChart3DBuilder.newSurfaceMeshSeries3D()
.withDataSeries(ds)
.withDrawMeshAs(DrawMeshAs.SolidWireframe)
.withStroke(blackColor)
.withContourStroke(stroke)
.withStrokeThicknes(1f)
.withDrawSkirt(false)
.withMeshColorPalette(new GradientColorPalette(colors, stops))
.withMetadataProvider(new SurfaceMeshMetadataProvider3D(pnl_time_spot_Z_3d, xSize, “common3DChartLayout”))
.withSeriesInfoProvider(new CustomSeriesInfo3DProvider1(fromModel, xSize))
.build();

UpdateSuspender.using(surfaceCommon3D, new Runnable() {
@Override
public void run() {
surfaceCommon3D.setCamera(camera);
surfaceCommon3D.setXAxis(xAxis);
surfaceCommon3D.setYAxis(yAxis);
surfaceCommon3D.setZAxis(zAxis);
surfaceCommon3D.getRenderableSeries().add(rs);
surfaceCommon3D.invalidate();
}
});

I am Requesting you to solved my issues ASAP.
Thanks in Advance

0 votes
0 answers
5k views

Hello there,
I am testing your 3d chart in demo project but I added X,Y and Z data, also added tool-tip to check the value

final TooltipModifier3D tooltipModifier3D = new TooltipModifier3D();
tooltipModifier3D.setIsEnabled(true);
tooltipModifier3D.setMarkerPlacement(Placement.TopRight);
tooltipModifier3D.setExecuteOnPointerCount(1);
tooltipModifier3D.setCrosshairMode(CrosshairMode.Lines);
surfaceCommon3D.getChartModifiers().add(tooltipModifier3D);

And also implement custom tool-tip UI.

The Issues is when I hover cursor on chart it not showing exact position on tool-tip. I attach SS png you can check it,
SS showing my cursor is on position x=6 but on tooltip it showing x=2.Waiting for your reply.

Thanks You

0 votes
8k views

I want to make my labels positions in the centre of axis (y axis which is transparent). Only three labels have to be showed. On the same height with the min, max and actual points. How can I achieve this.

enter image description here

0 votes
2k views

I looked at this answer for WPF.

https://stackoverflow.com/questions/10231627/convert-pixels-to-cm-in-wpf

Is there a similar option to get the dimensions in mm on Android?

0 votes
0 answers
6k views

Hello there,
I am testing SciChartSurface3D its working fine but when I do some changes with height in chart layout it not render properly and getting error:

E/emuglGLESv2_enc: a vertex attribute index out of boundary is detected. Skipping corresponding vertex attribute. buf=0xeb0966f0
E/emuglGLESv2_enc: Out of bounds vertex attribute info: clientArray? 1 attribute 1 vbo 129 allocedBufferSize 672 bufferDataSpecified? 1 wantedStart 0 wantedEnd 889012

I am requesting to please check this error.

0 votes
0 answers
2k views

Hello

Is it possible do detect taps/selection/click over Axis Titles?

Thanks!

0 votes
0 answers
5k views

Hello

Is it possible do detect taps/selection/click over the PointMarkers?

Thanks!

0 votes
2k views

Hello,

I am having trouble determining the parameters to pass to ModifierTouchEventArgs when overriding GestureModifierBase in the latest SciChart versions. I can’t figure out where to get the now required source and target values – the super class returns null when asked.. Code snippet below…

class MyCustomGestureModifier() : GestureModifierBase() {
    override fun onLongPress(e: MotionEvent?) {
    super.onLongPress(e)

    /* This worked in SciChart v4.2.0.4557, but no longer does due to ModifierTouchEvents now requiring source and target
    val args = ModifierTouchEventArgs()
    args.e = e
    args.isHandled = false
    args.isMaster = true
    args.isInSourceBounds = true
     */

    // create touch event args for rollover modifier
    // 4.3.0.4646 wants additional parameters for source and target
    val orgEvent = originalTouchEvent // this is null, so where should we get source and target?
    val args = ModifierTouchEventArgs(orgEvent.source, orgEvent.target)
    args.e = e
    args.isHandled = false

    rolloverModifier.onTouch(args)

    args.clear()
}

In case it helps, the above snippet is based on a previous discussion at https://www.scichart.com/questions/android/separating-rollover-tootips-and-pan-drag

Thank you.

  • C Bolton asked 2 years ago
  • last active 2 years ago
0 votes
3k views

Hello
My question is, if I buy a program license, where should I put the license ? If I statically place it in the application class, it can be easily accessed by decompiling the apk file and it can be stolen by others.

0 votes
3k views

Real Time EEG LiVE chart of 24 channels, jumps two x minor gridlines at a time . How to make it to move one gridline at a time ?

Is there any setting for that ?

0 votes
2k views

Now we have 24 channels added to one graph which is visible in one page or one screen of the mobile. Can we make it two pages or add a scroll bar and devide the channels into 12 each without two different scichart components

0 votes
2k views

I am using stepped yaxis graph – ECG example from your demo set. How do i control the speed of the live graph.
I want to makethe live graph a bit slow. Is there any setting or configuration to be modified to slow the graph. please let us know

Regards,
Aditya

1 vote
3k views

I created demo project using SurfaceMeshRenderableSeries3D but there is bugs or glitch. I have click listener.

image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (value == 0) {
layout.setVisibility(View.GONE);
value = 1;
} else {
value = 0;
layout.setVisibility(View.VISIBLE);
}
}
});

Above is basic GONE and VISIBLE logic, when i click image first time layout view is gone and SciChartSurface3D get full screen below is xml code.

<LinearLayout
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:orientation="vertical">

      <ImageView
          android:id="@+id/image"
          android:src="@mipmap/ic_launcher_round"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/>

      <LinearLayout
          android:background="@color/design_default_color_secondary_variant"
          android:visibility="visible"
          android:orientation="vertical"
          android:id="@+id/layout"
          android:layout_width="match_parent"
          android:layout_height="100dp"/>

      <com.scichart.charting3d.visuals.SciChartSurface3D
          android:id="@+id/chart3d"
          android:layout_width="match_parent"
          android:layout_height="match_parent" />

   </LinearLayout>

My issues is when i click image the Scichart is getting full but with some black screen glitch, I attach before and after click event images.

Thanks in advance i am waiting for your answer.

0 votes
0 answers
2k views

Attempt to invoke interface method ‘com.scichart.data.model.IRange com.scichart.charting.visuals.axes.IAxisCore.getVisibleRange()’ on a null object reference

Getting above error while testing tooltip in 3DChart .First time tooltip work but second time after added new data in 3DChart tooltip crash.

0 votes
7k views

We are using single SurfaceMeshRenderableSeries3D chart and added multidata on condition click event but issue is sometime data is loaded or sometime not. So my question is how to refresh 3D chart after added new data ?

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
2k views

thank you for answer !

Additional questions
image is attached

q1. last data only marker
q2. vertical dotted line (with rolloverModifier)

0 votes
3k views

Hi team,
Im using scicharts inside recyclerview and for some reasons im getting out of memory exception while loading or scrolling through the list.I’m not getting the issue everytime the page loads though.Is there something to do with optimization. The sample size to load the charts are high actually

0 votes
2k views

q1. How do I change the rollovermodifier’s vertical line to a dotted line?rolloverModifier.getVerticalLinePaint().setStyle(Paint.Style.STROKE);This source doesn’t seem to work

q2. I wonder how to display markers only on the last data of the line chart.

q3. I am wondering how to make the background transparent, how to make the grid transparent on the background.

0 votes
3k views

Hi team,

In my app,i’m using a custom rollover modifier as tool tip.I am representing y axis value (numerical value) in tooltip.I would like to have decimal places upto 3 digits in tooltip.do you have any suggestion to how i could achieve this. i’m attaching current screenshot along with this question.

Thanks
Vinu Gilbert

0 votes
9k views

Hello,

I am currently working on an DateTimeAxis where I am trying to display the labels in two hours intervals. So far it is working well but I have noticed when working with different timezones , if the timezone is odd, the labels display only odd numbers. When the timezone is even however the labels are even as well (eg. get-4 displays labels such as 2pm 4pm 6pm 8pm while gmt-7 displays 1pm 3pm 5pm 7pm)
I have played around with hours and dates to try to dynamically adjust the min and max visible ranges depending on if the current time is even or odd but that doesn’t affect at all the labels even after providing the major deltas and range.

does anyone know how to fix this issue? I want even labels regardless of the situation.

  • papa diaw asked 2 years ago
  • last active 2 years ago
0 votes
3k views

Hello,

I’m probably missing something obvious, but how can I change the font/colors of JUST the scichart legend (not axes labels or other text) in Android.

Thank you.

  • C Bolton asked 2 years ago
  • last active 2 years ago
0 votes
12k views

Hello,

At right chart we have show only one X-axis which needs to update in real time .whenever new values will come we have to update in X-axis in itself instead of adding new line at X-Axis.

Each time New Y – axis will come that will append at left chart (Can be consider left chart showing history of right chart)

Let me know if anything further requred

Thanks.

0 votes
9k views

Hello Friends ,

   Sync two Chart in Android Bottom chart can be change on top chart touch

We are looking a solution where we want show two chart at Top and Bottom in Android Screen.based on Top chart changed by gesture /finger touch should be expend/shrink like zoom in and out bottom chart

Assume at top chart data range has between 0 to 3,00,000 , I want to capture in bottom chart only selected/touched part in with expanded form.

I have attached below screen shot which may be helpful.

Solution can be like this but not able to get code for this implementation

https://blog.scichart.com/content/images/2021/06/Navigate-ECG-strip-with-Pocket-ECM.gif

https://blog.scichart.com/android-app-to-view-long-term-ecg-signals/

I appreciate any help regarding this issue.

0 votes
6k views

Hello,

As you have already the examples of the EEG -50 channel, Is it possible to set the sensitivity factor for the channels to show the graph.
Basically, this will set the amplitude based on the frequency variation example 7micro volts/millimeter (7microvolts/mm) for each channel. Is there any way we can do it using Scichart, please let us know.

Appreciate your help

Regards,
Aditya

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
3k views

When I work with the 2D Android Heatmap Chart, I want to draw a frame on the borders of the cells. Is this possible?

Thanks already for your help.

0 votes
3k views

Hi

I have added 24 Line graphs for EEG. Now I want to display the name of each channels against each graph. I am using Y steeped graph which you are using for Vital signs display in example code. Can you please let me know how to t to display the name of each channels against each graph

Best Regards,
Aditya

0 votes
3k views

Hi,

Can you please tell me how to show an annotation(extends at BoxAnnotation(x1, y1, 2, y2)) that starts at a certain point(x1, y1) and ends at the end of the chart. That is, the starting point (x1) is known, and the end point (x2) at the very end of the surface (graph)?
Thanks in advance.

Regards,
Batyr

Showing 51 - 100 of 536 results

Try SciChart Today

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

Start TrialCase Studies