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

Welcome to the SciChart Android Charts Community Forums!

Please see our Question asking guidelines before posting. You can also find our Android Charts Documentation in the SciChart Android SDK Zip.
  – Thanks & regards, SciChart Team

0 votes
0 answers
1 view

I want to monitor the event that the chart stops sliding, what’s the way

0 votes
33 views

When setting yAxis to have auto range enabled or when manually calling chartSurface.zoomExtents() after adding new data to chart, the top point are cropped (not shown in the chart). I have attached an image that shows this phenomenon (note: bottom part of the chart is cropped out of the image).

Below is full code of an Activity that reproduces the problem. I also updated the attached image that shows the result of the following code. As you can see both red points with y value of 1.1f are cropped out of the chart.

class MainActivity : AppCompatActivity()
{
    private val chartBuilder by lazy { SciChartBuilder.instance() }
    private val chartSurface by lazy { createChartSurface() }

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

        SciChartBuilder.init(this)
        setContentView(R.layout.activity_main)

        val background = findViewById<ViewGroup>(R.id.background)
        background.addView(chartSurface)

        addPoints()
    }

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

        val xAxis = chartBuilder.newNumericAxis()
            .withAxisTitle("X Axis title")
            .withVisibleRange(0.0, 1.0)
            .withAutoRangeMode(AutoRange.Always)
            .build()

        val yAxis = chartBuilder.newNumericAxis()
            .withAxisTitle("Y Axis title")
            .withVisibleRange(0.0, 1.0)
            .withAutoRangeMode(AutoRange.Always)
            .build()

        Collections.addAll(surface.xAxes, xAxis)
        Collections.addAll(surface.yAxes, yAxis)

        surface.renderableSeries.add(createSeries(Color.RED))
        surface.renderableSeries.add(createSeries(Color.BLUE))

        return surface
    }

    private fun createSeries(color: Int): FastLineRenderableSeries
    {
        val lineData = chartBuilder.newXyDataSeries(Long::class.javaObjectType, Float::class.javaObjectType)
            .withSeriesName("series")
            .build()

        return chartBuilder.newLineSeries()
            .withDataSeries(lineData)
            .withIsVisible(true)
            .withStrokeStyle(color, 2f, true)
            .build()
    }

    private fun addPoints()
    {
        val xValues = LongValues(longArrayOf(0, 1, 2, 3, 4, 5))

        @Suppress("UNCHECKED_CAST")
        var lineData = chartSurface.renderableSeries[0].dataSeries as XyDataSeries<Long, Float>
        lineData.append(xValues, FloatValues(floatArrayOf(0.9f, 1f, 1.1f, 0.9f, 1.1f, 1f)))

        @Suppress("UNCHECKED_CAST")
        lineData = chartSurface.renderableSeries[1].dataSeries as XyDataSeries<Long, Float>
        lineData.append(xValues, FloatValues(floatArrayOf(0f, 0f, 0f, 0f, 0f, 0f)))
    }
}
0 votes
54 views

Hello,

I am currently evaluating SciChart Android and have some questions:

1)
I am using fragments and when I load the fragment with the chart or replace the chart with another fragment, the view flashes black for a moment. This effect is considerable noticeable because I am using a white background for the chart.
VIDEO EXAMPLE

2)
My application domain is like kind of a stock chart. The Y-Values are Doubles while the X-Values are timestamps.
There are small gaps in the data so the distance from each point to the next one is not always the same.
The example dataset consists of 152 datapoints, starts at November 18, 17:00 and end at November 25, 16:00 with distances which are either 1 hour or 2 hours apart.
When zooming and dragging the graph, some labels for the date seem to appear and disappear at random which is really distracting.
VIDEO EXAMPLE

3)
When the user keeps zooming in, the labels should get more detailed.
It is kinda pointless when all the labels are showing the same day. How can I set it, that when the first visible point and the last visible point are only 2 days apart, that the format on the label is HH:MM and not the day and month?

Also, how can I set the maximum zoom? I got it working with the CategoryDateAxis but with the DateAxis it is different and I don’t know how to use the visibibleRangeLimit as the documentation for timeseries charts is rather lacking in this regard.

Our company is considering buying the chart for Android & iOS but those first two problems are king of a deal breaker for us.
Thank you.

My simple style code:

    <style name="CustomSciChart" parent="SciChart_BaseStyle">
    <item name="sciChartBackground">@android:color/white</item>
    <item name="majorGridLinesColor">@color/midLightGray</item>
    <item name="minorGridLinesColor">@color/midLightGray</item>

My chart code:

    final SciChartBuilder sciChartBuilder = SciChartBuilder.instance();
    surface.setTheme(R.style.CustomSciChart);
    XyDataSeries<Date, Double> lineData = sciChartBuilder.newXyDataSeries(Date.class, Double.class).build();
    final DateAxis xAxis = sciChartBuilder.newDateAxis()
            .withDrawMinorGridLines(false)
            .withDrawMinorTicks(false)
            .withAutoRangeMode(AutoRange.Once)
            .build();

    final IAxis yAxis = sciChartBuilder.newNumericAxis()
            .withAxisAlignment(AxisAlignment.Left)
            .withDrawMinorGridLines(false)
            .withDrawMinorTicks(false)
            .withGrowBy(0.2d, 0.2d)
            .build();

    final IRenderableSeries lineSeries = sciChartBuilder.newLineSeries()
            .withDataSeries(lineData)
            .withStrokeStyle(ContextCompat.getColor(getActivity(), R.color.colorPrimary), 2f, true)
            .build();


    PinchZoomModifier pinchZoomModifier = new PinchZoomModifier();
    pinchZoomModifier.setScaleFactor(1.5f);
    pinchZoomModifier.setDirection(Direction2D.XDirection);
    surface.getChartModifiers().add(pinchZoomModifier);

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


    surface.getRenderableSeries().add(lineSeries);
    Collections.addAll(surface.getYAxes(), yAxis);
    Collections.addAll(surface.getXAxes(), xAxis);

Fragment replacement:

         FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
        fragmentTransaction.replace(R.id.content, fragment, tag);
        fragmentTransaction.commit();
0 votes
48 views

I am trying to use SciChart library for my project and find out whether it satisfy all requirements.

I am currently trying to display the ECG signal. Therefore the data is coming in realtime.

I have the following configuration

 final NumericAxis xAxis = mSciChartBuilder
                .newNumericAxis()
                .withAxisTitle("Time (seconds)")
                .withDrawLabels(false)
                .withDrawMajorTicks(false)
                .withDrawMinorTicks(false)
                .withDrawMajorBands(false)
                .withDrawMajorGridLines(false)
                .withDrawMinorGridLines(false)
               // .withVisibleRange(0, 2040)
                .withAutoRangeMode(AutoRange.Always)
                //.withAutoRangeMode(AutoRange.Never)
                .build();
        final NumericAxis yAxis = mSciChartBuilder
                .newNumericAxis()
                .withAxisTitle("Voltage (mV)")
                //    .withGrowBy(0.1d, 0.1d)
                .withDrawLabels(false)
                .withDrawMajorTicks(false)
                .withDrawMinorTicks(false)
                .withDrawMajorBands(false)
                .withDrawMajorGridLines(false)
                .withDrawMinorGridLines(false)
                .withVisibleRange(Short.MIN_VALUE, Short.MAX_VALUE)
                .build();

It works but the X axis a little bit scaled/compress.

Here is the result

enter image description here

I need to make it a bit wider.

How can I do this ?

I have tried to set range manually like that

.withVisibleRange(0, 2040)

However in this case it doesn’t show anything.

I would be grateful for any help.

UPDATE

https://drive.google.com/file/d/17p1E-Z_YxiVh_JtwEvlM1PaTVyJ7eyz7/view

0 votes
54 views

I am using StackedColumnRenderableSeries and I have a problem when a data is displayed as it shows the incomplete graph as the second attached image.
Thank you

var xAxis = new DateAxis(this)
{
GrowBy = new DoubleRange(0.1, 0.1),
AxisTitle = “”,
AutoRange = AutoRange.Always,
TextFormatting = “MMM yyyy”,
DrawMajorGridLines = false,
DrawMinorGridLines = false,
AxisBandsStyle = new SolidBrushStyle(0xfff9f9f9),
};

0 votes
37 views

I use the surface.exportToBitmap () to get the picture, but the AxisMarker doesn’t match the actual display, and there’s no sharp arrow. How to solve?

0 votes
39 views

I want to draw one of the first picture, but FastLineRenderableSeriesBuilder found no fill color Settings, do you have other solution?

0 votes
52 views

I want to use code to intercept a picture, but find that the image is empty

    surface.buildDrawingCache();
    Bitmap src = surface.getDrawingCache();//save screenshot
    ((ImageView)findViewById(R.id.iv)).setImageBitmap(src);

how can I get the image of suface。

0 votes
31 views

When I insert a series of data, the hollow K diagram shows the error, and a line is displayed in the middle

ohlcSeries.insertRange(0,date,open,high,low,close);

My Settings are as follows:

candlestickSeries = sciChartBuilder.newCandlestickSeries()
            .withStrokeUp(UP_COLOR)
            .withStrokeDown(DOWN_COLOR)
            .withDataSeries(ohlcSeries)
            .withFillDownColor(0xFFFFFFFF)
            .withFillUpColor(UP_COLOR)
            .build();

How can I solve this problem?Please see the attachment for details。

0 votes
49 views

When I insert a series of data (more than 100 data)into the graph, the application crashes
Source code is as follows

    ma5Series.insertRange(0,date,ma5Y);
    ma10Series.insertRange(0,date,ma10Y);
    ma20Series.insertRange(0,date,ma20Y);
    macdSlowSeries.insertRange(0,date,macdFast,macdSlow);
    macdSignalSeries.insertRange(0,date,macdSignal);

The error is as follows

java.lang.UnsupportedOperationException: Data has been changed to a DataSeries which is unsorted in the X-Direction. Unsorted data can have severe performance implications in SciChart.

For maximum performance, please double-check that you are only inserting sorted data to SciChart. Alternatively, to disable this warning and allow unsorted data, please call dataSeries.setAcceptsUnsortedData(true).

I set up “dataSeries.setAcceptsUnsortedData (true)”, but still reported wrong.
how to solve it?

0 votes
54 views

How to position the legend in the botton of chart and make 2 column foreach tag?

0 votes
61 views

When setting yAxis to have auto range enabled or when manually calling chartSurface.zoomExtents() after adding new data to chart, the top point are cropped (not shown in the chart). I have attached an image that shows this phenomenon (note: bottom part of the chart is cropped out of the image).

Below is full code of an Activity that reproduces the problem. I also updated the attached image that shows the result of the following code. As you can see both red points with y value of 1.1f are cropped out of the chart.

class MainActivity : AppCompatActivity()
{
    private val chartBuilder by lazy { SciChartBuilder.instance() }
    private val chartSurface by lazy { createChartSurface() }

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

        SciChartBuilder.init(this)
        setContentView(R.layout.activity_main)

        val background = findViewById<ViewGroup>(R.id.background)
        background.addView(chartSurface)

        addPoints()
    }

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

        val xAxis = chartBuilder.newNumericAxis()
            .withAxisTitle("X Axis title")
            .withVisibleRange(0.0, 1.0)
            .withAutoRangeMode(AutoRange.Always)
            .build()

        val yAxis = chartBuilder.newNumericAxis()
            .withAxisTitle("Y Axis title")
            .withVisibleRange(0.0, 1.0)
            .withAutoRangeMode(AutoRange.Always)
            .build()

        Collections.addAll(surface.xAxes, xAxis)
        Collections.addAll(surface.yAxes, yAxis)

        surface.renderableSeries.add(createSeries(Color.RED))
        surface.renderableSeries.add(createSeries(Color.BLUE))

        return surface
    }

    private fun createSeries(color: Int): FastLineRenderableSeries
    {
        val lineData = chartBuilder.newXyDataSeries(Long::class.javaObjectType, Float::class.javaObjectType)
            .withSeriesName("series")
            .build()

        return chartBuilder.newLineSeries()
            .withDataSeries(lineData)
            .withIsVisible(true)
            .withStrokeStyle(color, 2f, true)
            .build()
    }

    private fun addPoints()
    {
        val xValues = LongValues(longArrayOf(0, 1, 2, 3, 4, 5))

        @Suppress("UNCHECKED_CAST")
        var lineData = chartSurface.renderableSeries[0].dataSeries as XyDataSeries<Long, Float>
        lineData.append(xValues, FloatValues(floatArrayOf(0.9f, 1f, 1.1f, 0.9f, 1.1f, 1f)))

        @Suppress("UNCHECKED_CAST")
        lineData = chartSurface.renderableSeries[1].dataSeries as XyDataSeries<Long, Float>
        lineData.append(xValues, FloatValues(floatArrayOf(0f, 0f, 0f, 0f, 0f, 0f)))
    }
}
0 votes
59 views

Hello,
I want to display a chart using a DateAxis as X-Axis. The data set contains values for each basic unit of chosen time base, e.g. for a time base of one month, I get 31 data points, with one value assigned for each day. I want the chart to display a label for each value assigned, but using automatic settings I get the following output:
enter image description here

I wanted to manipulate the ticks by setting the MajorDelta and MinorDelta properties, but it expects a value of type Date, and I’m not sure which value I should provide to get a timespan of 1 day, 1 hour etc.
I set EnableLabelCulling to false, but somehow it doesn’t seem to take any effect.

  • Anna Lazar asked 1 month ago
  • last active 4 weeks ago
0 votes
65 views

I crashed when I was quick to show and hide the content of the chart。

The source code is similar to the following:

public void show(){
if(!surface.getRenderableSeries().contains(lineUpSeries)) {
Collections.addAll(surface.getRenderableSeries(), lineUpSeries);
Collections.addAll(surface.getRenderableSeries(), lineDownSeries);
Collections.addAll(surface.getRenderableSeries(), line20Series);
Collections.addAll(surface.getAnnotations(), upTextMarker);
Collections.addAll(surface.getAnnotations(), downTextMarker);
Collections.addAll(surface.getAnnotations(), ma20TextMarker);
Collections.addAll(surface.getAnnotations(), upAxisMarker);
Collections.addAll(surface.getAnnotations(), downAxisMarker);
Collections.addAll(surface.getAnnotations(), ma20AxisMarker);
}
}
public void hide(){
if(surface.getRenderableSeries().contains(lineUpSeries)) {
surface.getRenderableSeries().remove(lineUpSeries);
surface.getRenderableSeries().remove(lineDownSeries);
surface.getRenderableSeries().remove(line20Series);
surface.getAnnotations().remove(upTextMarker);
surface.getAnnotations().remove(downTextMarker);
surface.getAnnotations().remove(ma20TextMarker);
surface.getAnnotations().remove(upAxisMarker);
surface.getAnnotations().remove(downAxisMarker);
surface.getAnnotations().remove(ma20AxisMarker);
}
}

error log:

java.lang.NullPointerException: Attempt to invoke interface method ‘boolean com.scichart.charting.visuals.annotations.IAnnotationPlacementStrategy.isInBounds(com.scichart.charting.visuals.annotations.AnnotationCoordinates, com.scichart.charting.visuals.annotations.IAnnotationSurface)’ on a null object reference
at com.scichart.charting.visuals.annotations.AnnotationBase.a(SourceFile:1207)
at com.scichart.charting.visuals.annotations.AnnotationBase.update(SourceFile:1105)
at com.scichart.charting.visuals.annotations.AxisMarkerAnnotation.update(SourceFile:246)
at com.scichart.charting.visuals.annotations.AnnotationBase.update(SourceFile:1083)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:327)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:218)
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:228)
at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:293)
at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:277)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1548)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1259)

0 votes
63 views

The online Quick Start Guide includes the code :

PenStyle penStyle = new PenStyle(ColorUtil.Green, true, 2f);

This needs to be updated as PenStyle is now abstract.

Presumably it should now be:

PenStyle penStyle = new SolidPenStyle(ColorUtil.Green, true, 2f, null);

or similar.

0 votes
66 views

I set the theme is: SciChart_Bright_Spark, but in Android 4.4 mobile phone, chart often display the grid interval display black box, how to solve?

0 votes
76 views

Very simply, I am attempting to get the Examples to compile and upload to my Android phone. The first download had the examples, but not including Showcases. That version I successfully compiled and ran on an Android phone. Very happy with the professional look and feel.

Since then, I re-downloaded the examples including Showcase and gone through so many upgrades of Android Studio and Gradle and various supporting libraries (as prompted) I’ve lost track.

However, now I cannot compile. Please tell me what dependency is broken of config needs to be changed. Someone else must have been through this.

Thank you for your help.
Ed

Error message:
Gradle sync failed: Could not find core.aar (com.scichart.library:core:2.0.1.1962).
Searched in the following locations:
https://www.myget.org/F/abtsoftware/maven/com/scichart/library/core/2.0.1.1962/core-2.0.1.1962.aar
Consult IDE log for more details (Help | Show Log) (9s 483ms)

I’ve also gone through and set Compile SDK Version to API 25, build tools version to 27. Then I get an error
Gradle sync failed: Could not find method android() for arguments [build_dpm8geo0q8d311u3f6njnup18$_run_closure10@1d7e526a] on root project ‘Examples’ of type org.gradle.api.Project.

Configuration:
MacOS 10.12.6, Android Studio 3.0 (updated from 2.3.x), JDK 1.8

0 votes
73 views

Hi, from the attached screenshot, we can see that the axis marker is somehow overlapped the chart content. I would like to ask how to resize the annotation so that we can fix this issue? thanks.

  • Ray Hung asked 1 month ago
  • last active 1 month ago
0 votes
76 views

Hello,
is it possible to modify the corner radius of tooltips in SciChart Android?

  • Anna Lazar asked 1 month ago
  • last active 1 month ago
0 votes
86 views

I am using SCICHART in my project on Xamarin.Android, but the default them show some themes but I would like to change the background grid color of the reports. Please any can help me ?.

2 votes
105 views

Hi SciChart Team,

Thank you all for your help and support.

I finally got the multiple symbols on the stock chart with reference to this and with this clear explanation
IAnnotation annotation = builder.newCustomAnnotation().withContent(R.layout.example_custom_annotation_view).withYAxisId(PRICES).withPosition(i, prices.getHighData().get(i)).withVerticalAnchorPoint(VerticalAnchorPoint.Bottom).build();
this.annotations.add(annotation);

The above code worked for me and hope it helps to others too who all are trying this.

Thanks,
Ghousia

0 votes
101 views

Hi Yura,

Thank you for the answer here

I already did tried that way before also but was unable to display the custom annotations, even though I give the YAxisId the symbols are not visible on the chart…

I would be really grateful if you could help me out with this please

0 votes
92 views

Hello,

Please verify my code and help me out where I am going wrong to display multiple symbols on a price chart of multipane stock charts…
The symbols are not getting displayed

private class PricePaneModel extends BasePaneModel {

    public PricePaneModel(SciChartBuilder builder, PriceSeries prices) {
        super(builder, PRICES, "$0.0000", true);

        // Add the main OHLC chart
        final OhlcDataSeries<Date, Double> stockPrices = builder.newOhlcDataSeries(Date.class, Double.class).withSeriesName("EUR/USD").build();            
        stockPrices.append(prices.getDateData(), prices.getOpenData(), prices.getHighData(), prices.getLowData(), prices.getCloseData());
        addRenderableSeries(builder.newCandlestickSeries().withDataSeries(stockPrices).withYAxisId(PRICES).build());

        List<Double> maLowPoints = MovingAverage.movingAverage(prices.getCloseData(), 50);
        List<Double> maHighPoints = MovingAverage.movingAverage(prices.getCloseData(), 200);

        final XyDataSeries<Date, Double> maLow = builder.newXyDataSeries(Date.class, Double.class).withSeriesName("Low Line").build();
        maLow.append(prices.getDateData(), maLowPoints);
        addRenderableSeries(builder.newLineSeries().withDataSeries(maLow).withStrokeStyle(0xFFFF3333, 1f).withYAxisId(PRICES).build());

        final XyDataSeries<Date, Double> maHigh = builder.newXyDataSeries(Date.class, Double.class).withSeriesName("High Line").build();
        maHigh.append(prices.getDateData(), maHighPoints);
        addRenderableSeries(builder.newLineSeries().withDataSeries(maHigh).withStrokeStyle(0xFF33DD33, 1f).withYAxisId(PRICES).build());

        AnnotationCollection annotations = priceChart.getAnnotations();
        for (int i = 0; i < prices.size(); i++) {                
            if(maLowPoints.get(i) > maHighPoints.get(i) && maLowPoints.get(i-1) < maHighPoints.get(i-1)) {
                IAnnotation annotation = builder.newCustomAnnotation().withPosition(i, prices.getHighData().get(i)).withVerticalAnchorPoint(VerticalAnchorPoint.Bottom).build();
                annotations.add(annotation);                    
            }
            else if(maLowPoints.get(i) < maHighPoints.get(i) && maLowPoints.get(i-1) > maHighPoints.get(i-1))
            {
                IAnnotation annotation = builder.newCustomAnnotation().withPosition(i, prices.getHighData().get(i)).withVerticalAnchorPoint(VerticalAnchorPoint.Bottom).build();
                annotations.add(annotation);
            }
        }

        Collections.addAll(annotations,                   
                builder.newAxisMarkerAnnotation().withY1(stockPrices.getYValues().get(stockPrices.getCount() - 1)).withBackgroundColor(0xFFFF3333).withYAxisId(PRICES).build(),
                builder.newAxisMarkerAnnotation().withY1(maLow.getYValues().get(maLow.getCount() - 1)).withBackgroundColor(0xFFFF3333).withYAxisId(PRICES).build(),
                builder.newAxisMarkerAnnotation().withY1(maHigh.getYValues().get(maHigh.getCount() - 1)).withBackgroundColor(0xFF33DD33).withYAxisId(PRICES).build());           
    }
}
0 votes
110 views

Hello,

I am trying to pass multiple custom symbols both (up and down arrows) on multipane stock chart in such a manner that green symbols should be below OHLC candle and red symbols above OHLC candles but I cannot place it in proper manner

Can anyone please help me out with how to give positioning on X axis as it is an year scale?

0 votes
96 views

Hello.

I have found out that calling suspendUpdate() and resumeUpdate() on a SciChartSurface object allocates memory that is never released. The allocations get bigger with more data in the chart.

I have created an empty Android project. I have added a SciChartSurface and a Button. Pressing the button suspends and resumes updates. You can then see in the Android Monitor that after each press of the button the memory consumption of the app increases. Since the chart is empty the allocations are very small but still noticeable. I have attached the zip of the example project.

Kotlin code of the Activity in the project:

class MainActivity : AppCompatActivity()
{
    override fun onCreate(savedInstanceState: Bundle?)
    {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val layout = findViewById(R.id.layout) as ConstraintLayout

        val chartSurface = SciChartSurface(this)
        layout.addView(chartSurface)

        val button = findViewById(R.id.button) as Button
        button.setOnClickListener {
            val suspender = chartSurface.suspendUpdates()
            chartSurface.resumeUpdates(suspender)
        }
    }
}

I

P.S.:
I have tried to open a priority ticket, but I got the following error:

We encountered a problem (cross-site request forgery detected); please try again
Sorry, we encountered a problem (invalid department). Please start over.

0 votes
103 views

I am trying to integrate custom symbols from AnnotationsAreEasyFragment to MultiPaneStockChartsFragment but the symbols are not visible on price chart of MultiPane… can anyone please help me out with how to give X and Y axis in multipane price chart

0 votes
145 views

hi

any plans to support xamarin forms in the future.

  • SPS asked 2 months ago
  • last active 2 months ago
0 votes
133 views

Hello!

I want the chart to scroll from right to left and stop at left side. Don’t automatically scale, don’t move right.

I have a modifier:

ZoomPanModifier zoomModifier = new ZoomPanModifier() { ... };
zoomModifier.setReceiveHandledEvents(true);
zoomModifier.setXyDirection(XyDirection.XDirection);
zoomModifier.setClipModeX(ClipMode.ClipAtExtents);
// zoomModifier.setClipModeX(ClipMode.ClipAtMin);

When I scroll a chart left to the beginning, it scales the chart to one screen. So, all points are visible, proportions are broken.
When I replace “ClipMode.ClipAtExtents” to “ClipMode.ClipAtMin”, it sometimes stops at left side (as desired), but if I swipe too fast, it shows a right part of the chart and continues to scroll left.
Currently a first version of the SciChart library is installed.
As written in https://www.scichart.com/documentation/android/v1.x/SciChart.Charting~com.scichart.charting.ClipMode.html both “ClipAtExtents” and “ClipAtMin” have another behaviour.
My question is similar to https://www.scichart.com/questions/question/disable-scaling-on-zoompanmodifier, but for Android.

Answer, please, is it a bug? Has it been already fixed or expected to be fixed?

  • Alex N asked 3 months ago
  • last active 3 months ago
0 votes
157 views

Hi, I would like to make styling on the candlestick stroke of each tick by different situation, like if open > close show red stroke and on reverse in blue color stoke.

I have extended the PaletteProviderBase and implemented the IStrokePaletteProvider and IFillPaletteProvider interface, it seems that it always render the black stroke, but the filled color was correct as expected. Is there any way to custom the stroke color by case? Thanks!

I use the same approach as this suggested (candlestick-chart-coloring) , it seems in 2.0.0 cannot style the stroke as this way.

  • may lym asked 3 months ago
  • last active 3 months ago
1 vote
180 views

I managed to spearate the legend from the SciChartSurface, however the way I did it is very hackish. I couldn’t find any documentation on how it is supposed to be done correctly.

The way I did it (Kotlin code):

val legend = SciChartLegend(context)
legendModifier = LegendModifier(legend)
legendModifier.setOrientation(Orientation.VERTICAL)
legendModifier.setLegendPosition(Gravity.START or Gravity.TOP, 0)
legendModifier.setSourceMode(SourceMode.AllVisibleSeries)
legendModifier.setShowSeriesMarkers(true)
legendModifier.setShowCheckboxes(true)


val modifierGroup = chartBuilder.newModifierGroup().build()
modifierGroup.childModifiers.add(legendModifier)
chartSurface.chartModifiers.add(modifierGroup)

if(legend.parent != null)
{
    (legend.parent as ViewGroup).removeView(legend)
}

val linearLayout = LinearLayout(context)
linearLayout.orientation = LinearLayout.VERTICAL
linearLayout.addView(legend)
linearLayout.addView(chartSurface)

I was surprised that passing the legend to LegendModifier constructor also adds it to it’s layout. So I had to manually remove it and add it to my LinearLayout. It does work, but as I said, it is a hackish way of doing it. My question is, how is it done correctly?

0 votes
192 views

Hi !
Is it possible to display the RollOverModifier tooltip on the real points only ? Say I have points (1 1) and (3 3) in my chart and I don’t wan’t the tooltip to display (1.5 1.5), (2 2), (2.5 2.5) etc. when rolling over… Any idea ?

Thank you,

Adrien

0 votes
233 views

Hi, I would like to ask how can I draw Renko and 3 Line Break Chart using SciChart API ? thanks.

  • Ray Hung asked 4 months ago
  • last active 4 months ago
0 votes
152 views

Hi,

I’m trying to colorize my Column Chart according to my Candle Chart (red / green).
I’ve tried to create a Palette provider, but I don’t know how to get the corresponding item from my Candle Data.

How can I do this?

0 votes
179 views

When Im trying to remove an annotation, I’m receiving an error:

java.lang.NullPointerException: Attempt to invoke interface method
‘void
com.scichart.charting.visuals.annotations.IAnnotationPlacementStrategy.drawAdorner(android.graphics.Canvas)’
on a null object reference
at
com.scichart.charting.visuals.annotations.AnnotationBase.onDrawAdorner(SourceFile:889)
at
com.scichart.charting.visuals.annotations.AdornerLayer.onDraw(SourceFile:144)
at android.view.View.draw(View.java:17071)
at android.view.View.updateDisplayListIfDirty(View.java:16053)

I’ve tried many ways, like:

UpdateSuspender.using(priceChart, new Runnable() {
    @Override
    public void run() {
        priceChart.getAnnotations().clear();
    }
});

and

UpdateSuspender.using(priceChart, new Runnable() {
    @Override
    public void run() {
        priceChart.getAnnotations().remove(myAnnotation);
    }
});
0 votes
201 views

Hi ,

I am trying to change background color of scichart surface and also need to change color of grid bands and grid lines.

So far I am able change background color of scichart surface using scichartSurface.setBackgroundcolor API

But I am not able to find api can customize/ remove grid bands and grid lines.

Please find images attached for more details.

0 votes
267 views

I see there is a Polar chart type for WPF charts and that one is “coming soon” to Android. Is it known when we can expect it to be available on Android?

Thank you in advance.

0 votes
199 views

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

0 votes
224 views

Hello !

I have a chart displaying very accurate data and I would like the RolloverModifier to adopt the same format as my Y axis.
I want to avoid problems similar to the one on the screenshot attached. The tooltip is indicating -0 and I would like it to display something like -2.5E-6.

Thank you for your help,

Adrien

0 votes
261 views

Is it possible to give an arrow type style to the axes? As seen in the attached image.

It would be perfect!

Otherwise, I would like to know if it is not possible, not to take into account this characteristic in my development.

I hope you can give me a clue please. Thanks in advance.

1 vote
366 views

Is it possible to put a background image on a chart? I hope you can give me a hint thanks in advance.

I attach an image for the purpose of my query.

0 votes
238 views

I hope you can help me, please. Is it possible to remove the lines that protrude on the edge of the graphics, as shown in the image? If so, what would be the procedure?

Thank you very much in advance…

0 votes
252 views

I hope you can help me I have managed to change the font color, size, but I do not know how to put the annotation with underlined font, who could give me a clue please. I would like to get something like what is shown in the image I attached. Thanks in advance.

0 votes
279 views

I was wondering about the possibilities to show markers. I dug a while in the examples and played with default interactions, which use dragging to update the position of the marker.

On mobile devices this conflicts a little with the pan interaction to move the chart. I saw there’s also the possibility to pan using the axes area. There’s also the possibility to just tap on the chart, which doesn’t conflict with other interactions, to show a marker, but I couldn’t find how to do this. At least there doesn’t seem to be built in support for it? How should this be done?

Additionally I would like once a marker appears to either be able to update only by tapping again at other place on the chart (simple solution) or temporarily disabling the panning such that this gesture only moves the marker and not the chart (preferred, but probably less simple solution). So tapping on the chart would enter “marker mode” which disables zooming and panning and some other gesture – e.g. using an external button on the chart, would leave “marker mode” and enter zoom/pan mode again.

Any ideas how to achieve this? Thanks in advance!

P.S. I’m also using a real time chart, though this probably doesn’t make a difference concerning this.

0 votes
251 views

I have to implement a zoomable real time chart. I started with CreateRealTimeTickingStockChartFragment as it seems to be the nearest to what I need. I added .withPinchZoomModifier().build() to the chart modifiers, but it doesn’t work very well, there’s lag and jumps…

I’m testing on a Nexus 5.

I also started adapting the example to what I need need which uses a numeric x axis (it measures seconds, which can appear irregularly, so I assume it’s numeric), but noticing the same problems there.

Using SciChart v1.2.1.1540

From this thread, there seems to have been some related problems in an older version, maybe this hasn’t been fully fixed yet? Or maybe I’m configuring something wrong, started using SciChart today and very new to this.

Thanks in advance and amazing work! I’m very excited about this library and hope this works because otherwise it will be probably a deal breaker for the people I’m working for :/

0 votes
339 views

Dear All,

I would like to ask are there any method to draw a line (or annotation) by user touch event ?

For example user touch the chart to set the starting point of the line and then touch/drag to another point to draw the line.

Thanks.

  • Ray Hung asked 7 months ago
  • last active 7 months ago
0 votes
379 views

Hi,

According to the documentation, in FastCandlestickRenderableSeries

StrokeUp and FillUp styles are applied to bars with Close > Open, and StrokeDown and FillDown to those that have Open <= Close respectively.

I would like to ask is there any method to achieve the following:

The candlestick are green in color when Today Close >= Previous Close and red in color when Today Close < Previous Close

Thanks.

  • Ray Hung asked 7 months ago
  • last active 3 months ago
0 votes
308 views

On VS2017, in LineChartFragment.cs, I am trying to use VerticalSliceModifier, but it is not found.

var verticalSliceModifier = new VerticalSliceModifier();

Thank for your help.

1 vote
332 views

Hi,
I am trying to implement pan and zoom functionalities for real time charts present in Sci chart demo application
Can any one please suggest me on how to implement the same

Thanks in advance

0 votes
316 views

in IOS SDK there are SCIAxisRangeSyncronization and SCIAxisAreaSizeSyncronization for dealing with axis sync. I would like to ask are there any similar classes in Android to do this ? Thanks.

  • Ray Hung asked 7 months ago
  • last active 7 months ago
1 vote
415 views

Hey folks,

I have an Android device (CAT S40) running 5.1 on it. I am encountering an issue when pressing the home button or lock button. It seems that sometimes when the app is in pause or sleep my chart surfaces are destroyed and turn black. I have only seen this problem on this device. The only way to restore them is to restart the app. I researched this issue an found information on OpenGL context getting destroyed on pause. There is a setting in GLSurfaceView called setPreserveEGLContextOnPause. I am not sure if it is possible to access this setting from the SciChartSurface or not.

After seeing this, I tested the SciChart example app to see if the problem was isolated to my app, but it happened in the example app as well.
Again this is the only device I have seen this happen on and I’ve tested multiple devices.

Thanks for your help

Showing 1 - 50 of 79 results
SciChart WPF v5 is here! Use the discount code SCICHARTV5 to get 15% off WPF Charts until December 31st!Read More
+