Pre loader

Tag: real time update

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

0 votes

Hi, I’ve found that there is no example of using SciChart in SwiftUI, the swift examples are using storyboard.

I’ve tried that, using SciChart in SwiftUI, and it worked. But I have some confusions about axis update and data update.

in SwiftUI, first I create a chartview struct as NSViewRepresentable, and in func makeNSView(context: Context) -> SCIChartSurface{} to initialize the chartview as any supported SciChart view type.

second, in func updateNSView(_ nsView: SCIChartSurface, context: Context){} to update the data and axis.

When updating axis(like visiablerange), every time I need call nsView.xAxes.clear() to remove axis first and then add axis again.

When updating data, every time I need to call nsView.renderableSeries.clear() to clear current plot data first and then call nsView.renderableSeries.add() to update the data.

My confusion is that is this the right way to do that? It seems not quite efficient.

  • Keyu Yan asked 2 years ago
  • last active 2 years ago
0 votes

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(
    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)

    UpdateSuspender.using(surface) {
        // surface.yAxes.add(yAxisTwo)

        series.forEach {


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


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


1 vote

Hello SciChart Team,

We are using SciChart v6.1.1.13156 since about a year in our main software that is used by customers worldwide.
The SciChartSurface-Style that all charts use is configured to use the VisualXcceleratorEngine (in DirectX9 mode, as some customers had problems with invisible charts on specific older intel graphics chipsets).

In the last weeks we had several inqiuiries from customers (from Japan, Korea), that the charts in their software do not update when adding new values, the chart is only updated when minimizing and then showing the window again. Another issue was that the X-Axis was updated fluently but the chart (line-chart) only very irregularly (about 2-3 times in a 30sec measurement which provides a value every 20msec). All of these customers use new laptops with 11th generation Intel CPUs. One of these had an Nvidia-graphics card installed an when forcing to use it with our software the charts worked perfectly.

We added an option in our software to Enable Software Rendering (Highspeed Renderer) to increase compatibility when having the above mentioned issues as we thought that it has to do with the VisualXcceleratorEngine, but this did not change anything unfortunately.

We want (and have) to solve this problem as this breaks the functionality of our software with some of our biggest customers.

Best regards,
Oliver from Cologne Germany

0 votes

Hi, i am trying to read an excel file which contains a few column of data to be plotted. The number of series depends on number of column in the excel file. Hence, the number of series need to be plotted dynamically. Besides, for each series, the data in not plotted in one shot. There is a timer used to plot each data point dynamically.

I am trying to use “ObservableCollection” in this case, i able to create the fastlinerenderableseries and XyDataSeries for each line series and add them into the ObservableCollection. However, i do not know how to have the real time update on each line series.

Please provide me some guide or tutorials.
Looking forward for your reply.

  • mian ooi asked 4 years ago
  • last active 4 years ago
Showing 5 results

Try SciChart Today

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

Start TrialCase Studies