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

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

0 votes
3k views

editable box annotation

Hi,

Can you please tell me how to change selection points of annotation?

Thanks in advance.

Regards,
Batyr

0 votes
3k views

We are adding 24 channel data Live graph using Scichart Example of Vital sign monitor. We are using VitalSignsMonitorShowcaseFragment.java example.

To show the live graph, do we need to accumulate the data for 50 point or so. I see in the code they are accumulating?

Is it necessary for the accumulation, please let us know

protected void initExample(ExampleVitalSignsMonitorFragmentBinding binding) {
    final DefaultVitalSignsDataProvider dataProvider = new DefaultVitalSignsDataProvider(getActivity());

    setUpChart(dataProvider);

    dataProvider.getData().buffer(50, TimeUnit.MILLISECONDS).doOnNext(ecgData -> {
        if(ecgData.isEmpty()) return;

        dataBatch.updateData(ecgData);

        UpdateSuspender.using(binding.surface, () -> {
            final DoubleValues xValues = dataBatch.xValues;

            ecgDataSeries.append(xValues, dataBatch.ecgHeartRateValuesA);
            ecgSweepDataSeries.append(xValues, dataBatch.ecgHeartRateValuesB);

            bloodPressureDataSeries.append(xValues, dataBatch.bloodPressureValuesA);
            bloodPressureSweepDataSeries.append(xValues, dataBatch.bloodPressureValuesB);

            bloodOxygenationDataSeries.append(xValues, dataBatch.bloodOxygenationA);
            bloodOxygenationSweepDataSeries.append(xValues, dataBatch.bloodOxygenationB);

            bloodVolumeDataSeries.append(xValues, dataBatch.bloodVolumeValuesA);
            bloodVolumeSweepDataSeries.append(xValues, dataBatch.bloodVolumeValuesB);

            final VitalSignsData lastVitalSignsData = dataBatch.lastVitalSignsData;
            final double xValue = lastVitalSignsData.xValue;

            lastEcgSweepDataSeries.append(xValue, lastVitalSignsData.ecgHeartRate);
            lastBloodPressureDataSeries.append(xValue, lastVitalSignsData.bloodPressure);
            lastBloodOxygenationSweepDataSeries.append(xValue, lastVitalSignsData.bloodOxygenation);
            lastBloodVolumeDataSeries.append(xValue, lastVitalSignsData.bloodVolume);
        });
    }).compose(bindToLifecycle()).subscribe();

    updateIndicators(0);
    Observable.interval(0, 1, TimeUnit.SECONDS, AndroidSchedulers.mainThread())
            .doOnNext(this::updateIndicators)
            .compose(bindToLifecycle()).subscribe();
}
0 votes
0 answers
5k views

I’ve recently found out that for some particular charts ,the series is not completely visible for top and bottom most parts of the chart.I need to drag the axis to see those portions.do you any suggestions for this issue.I’ll attach some ss.

Thanks in Advance

0 votes
3k views

Hi, I’ve trying to run the charts in emulator and it works fine with recyclerview ,but when i try to render chart in a fragment it doesn’t shows.The same fragment render charts in device and issue with emulator.I’m using geny motion. Thanks in Advance

0 votes
6k views

Hi,

Can you please tell me do you have tool like https://www.scichart.com/documentation/win/current/webframe.html#Fibonacci%20Retracement%20Drawing%20Tool.html
on Android?
If not, please give me a sample code on how to implement this with scichart.
Thanks in advance.

Regards,
Batyr

0 votes
6k views

Hi,

I,ve added ZoomExtentsModifier(), PinchZoomModifier() to the chart modifier.I want these modifiers on Xaxis only not on YAxis.Is possible to remove these modifiers on one axis.My requirement is that, during pinchzoom yaxis value needs to be constant

0 votes
3k views

Hi, I’ve been working on recyclerview with scichart.The problem i’m facing is that sometimes,when you come back from other screens the charts is not loading eventhough the other data in the list are showing.The list is placed inside a view pager .This issue is not consistant sometimes it shows the graph sometimes it won’t .The exception i’m getting are

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child’s parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:5260)
at android.view.ViewGroup.addView(ViewGroup.java:5089)

2021-08-17 14:50:52.639 15073-29533/com.fascilityconnex.voicemobile E/SciChart Rendering Errors: SciChartSurface has no XAxes. Please ensure SciChartSurface.XAxis is set, or SciChartSurface.XAxes has at least one axis
2021-08-17 14:50:52.641 15073-29531/com.fascilityconnex.voicemobile E/Exception: null
java.lang.UnsupportedOperationException: AxisCollection.getAxisById(‘DefaultAxisId’) returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart
at com.scichart.charting.model.AxisCollection.getAxisById(SourceFile:10)

0 votes
9k views

I would like to add scroll listener on x axis title. Is it possible to add scroll to axis title

0 votes
3k views

When I open the activity with the chart , I see a black screen. And there is no graph displayed.
I have a trial license key which is valid.

Here is my full code:
xml file:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/chart_layout"
android:orientation="vertical">

Activity:

public class ECGMonitorFragment extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    try {
        com.scichart.charting.visuals.SciChartSurface.setRuntimeLicenseKey("");
    } catch(Exception e){

        Log.e("SciChart", "Error while accesing the license", e);
    }


    setContentView(R.layout.activity_ecgmonitor_fragment);



    // Create a SciChartSurface
    final SciChartSurface surface = new SciChartSurface(this);

    // Get a layout declared in "activity_main.xml" by id
    LinearLayout chartLayout = (LinearLayout) findViewById(R.id.chart_layout);

    // Add the SciChartSurface to the layout
    chartLayout.addView(surface);

    // Initialize the SciChartBuilder
    SciChartBuilder.init(this);

    // Obtain the SciChartBuilder instance
    final SciChartBuilder sciChartBuilder = SciChartBuilder.instance();

    // Create a numeric X axis
    final IAxis xAxis = sciChartBuilder.newNumericAxis()
            .withAxisTitle("X Axis Title")
            .withVisibleRange(-5, 15)
            .build();

    // Added in Tutorial #8 - two Y axes
    // Create a numeric axis, right-aligned
    final IAxis yAxisRight = sciChartBuilder.newNumericAxis()
            .withAxisTitle("Primary")
            // Assign a unique ID to the axis
            .withAxisId("primaryYAxis")
            .withAxisAlignment(AxisAlignment.Right)
            .build();

    // Create another numeric axis, left-aligned
    final IAxis yAxisLeft = sciChartBuilder.newNumericAxis()
            .withAxisTitle("Secondary")
            // Assign a unique ID to the axis
            .withAxisId("secondaryYAxis")
            .withAxisAlignment(AxisAlignment.Left)
            .withGrowBy(0.2,0.2)
            .build();

    // Add both Y axes to the YAxes collection of the surface
    Collections.addAll(surface.getYAxes(), yAxisLeft, yAxisRight);

    // Added in Tutorial #3
    // Add a bunch of interaction modifiers to a ModifierGroup
    ModifierGroup chartModifiers = sciChartBuilder.newModifierGroup()
            // Setting MotionEventsGroup
            .withMotionEventsGroup("SharedMotionEvents").withReceiveHandledEvents(true)
            .withPinchZoomModifier().build()
            .withZoomPanModifier().withReceiveHandledEvents(true).build()
            .withZoomExtentsModifier().withReceiveHandledEvents(true).build()
            .withXAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Scale).withClipModeX(ClipMode.None).build()
            .withYAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Pan).build()
            .build();

    // Add the X axis to the XAxes collection of the surface
    Collections.addAll(surface.getXAxes(), xAxis);

    // Add the interactions to the ChartModifiers collection of the surface
    Collections.addAll(surface.getChartModifiers(), chartModifiers);

    // Added in Tutorial #6 - FIFO (scrolling) series
    // Create a couple of DataSeries for numeric (Int, Double) data
    // Set FIFO capacity to 500 on DataSeries
    final int fifoCapacity = 500;

    final XyDataSeries lineData = sciChartBuilder.newXyDataSeries(Integer.class, Double.class)
            .withFifoCapacity(fifoCapacity)
            .build();
    final XyDataSeries scatterData = sciChartBuilder.newXyDataSeries(Integer.class, Double.class)
            .withFifoCapacity(fifoCapacity)
            .build();

    // Create and configure a line series
    final IRenderableSeries lineSeries = sciChartBuilder.newLineSeries()
            .withDataSeries(lineData)
            // Register on a particular Y axis using its ID
            .withYAxisId("primaryYAxis")
            .withStrokeStyle(ColorUtil.LightBlue, 2f, true)
            .build();

    // Create an Ellipse PointMarker for the Scatter Series
    EllipsePointMarker pointMarker = sciChartBuilder
            .newPointMarker(new EllipsePointMarker())
            .withFill(ColorUtil.LightBlue)
            .withStroke(ColorUtil.Green, 2f)
            .withSize(10)
            .build();

    // Create and configure a scatter series
    final IRenderableSeries scatterSeries = sciChartBuilder.newScatterSeries()
            .withDataSeries(scatterData)
            // Register on a particular Y axis using its ID
            .withYAxisId("primaryYAxis")
            .withPointMarker(pointMarker)
            .build();

    // Add a RenderableSeries onto the SciChartSurface
    surface.getRenderableSeries().add(scatterSeries);
    surface.getRenderableSeries().add(lineSeries);
    surface.zoomExtents();

    // Added in Tutorial #5
    // Create a LegendModifier and configure a chart legend
    ModifierGroup legendModifier = sciChartBuilder.newModifierGroup()
            .withLegendModifier()
            .withOrientation(Orientation.HORIZONTAL)
            .withPosition(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 10)
            .build()
            .build();

    // Add the LegendModifier to the SciChartSurface
    surface.getChartModifiers().add(legendModifier);

    // Create and configure a CursorModifier
    ModifierGroup cursorModifier = sciChartBuilder.newModifierGroup()
            // Setting MotionEventsGroup
            .withMotionEventsGroup("SharedMotionEvents").withReceiveHandledEvents(true)
            .withCursorModifier().withShowTooltip(true).build()
            .build();

    // Add the CursorModifier to the SciChartSurface
    surface.getChartModifiers().add(cursorModifier);

    // Added in Tutorial #9 - one more SciChartSurface
    final SciChartSurface surface2 = new SciChartSurface(this);

    // Add the SciChartSurface to the layout
    chartLayout.addView(surface2);

    // Set layout parameters for both surfaces
    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f);
    surface.setLayoutParams(layoutParams);
    surface2.setLayoutParams(layoutParams);

    // Create a numeric X axis
    final IAxis xAxis2 = sciChartBuilder.newNumericAxis()
            .withAxisTitle("X Axis Title")
            .withVisibleRange(-5, 15)
            .build();

    // Create a numeric axis
    final IAxis yAxisRight2 = sciChartBuilder.newNumericAxis()
            .withAxisTitle("Primary")
            .withAxisId("primaryYAxis")
            .withAxisAlignment(AxisAlignment.Right)
            .build();

    // Create another numeric axis
    final IAxis yAxisLeft2 = sciChartBuilder.newNumericAxis()
            .withAxisTitle("Secondary")
            .withAxisId("secondaryYAxis")
            .withAxisAlignment(AxisAlignment.Left)
            .withGrowBy(0.2, 0.2)
            .build();

    // Add the Y axis to the YAxes collection of the surface
    Collections.addAll(surface2.getYAxes(), yAxisLeft2, yAxisRight2);

    // Add the X axis to the XAxes collection of the surface
    Collections.addAll(surface2.getXAxes(), xAxis2);

    // Create and configure an area series
    final IRenderableSeries areaSeries = sciChartBuilder.newMountainSeries()
            .withDataSeries(scatterData)
            .withYAxisId("primaryYAxis")
            .withStrokeStyle(ColorUtil.LightBlue, 2f, true)
            .withAreaFillColor(ColorUtil.argb(ColorUtil.LightSteelBlue, 0.6f))
            .build();

    // Add the area series to the RenderableSeries collection of the surface
    Collections.addAll(surface2.getRenderableSeries(), areaSeries);

    // Create the second collection of chart modifiers
    ModifierGroup chartModifiers2 = sciChartBuilder.newModifierGroup()
            // Setting MotionEventsGroup
            .withMotionEventsGroup("SharedMotionEvents").withReceiveHandledEvents(true)
            .withZoomExtentsModifier().withReceiveHandledEvents(true).build()
            .withZoomPanModifier().withReceiveHandledEvents(true).build()
            .withPinchZoomModifier().withReceiveHandledEvents(true).build()
            .withCursorModifier().withReceiveHandledEvents(true).build()
            .build();

    // Add the interactions to the ChartModifiers collection of the surface
    Collections.addAll(surface2.getChartModifiers(), chartModifiers2);

    TimerTask updateDataTask = new TimerTask() {
        private int x = 0;

        @Override
        public void run() {
            UpdateSuspender.using(surface, new Runnable() {
                @Override
                public void run() {
                    lineData.append(x, Math.sin(x * 0.1));
                    scatterData.append(x, Math.cos(x * 0.1));

                    // Added in Tutorial #7
                    // Add an annotation every 100 data points
                    if(x%100 == 0) {
                        TextAnnotation marker = sciChartBuilder.newTextAnnotation()
                                // Register on a particular Y axis using its ID
                                .withYAxisId("primaryYAxis")
                                .withIsEditable(false)
                                .withText("N")
                                .withBackgroundColor(ColorUtil.Green)
                                .withX1(x)
                                .withY1(0.0)
                                .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
                                .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center)
                                .withFontStyle(20, ColorUtil.White)
                                .withZIndex(1)
                                .build();

                        surface.getAnnotations().add(marker);

                        // Remove one annotation from the beginning
                        // in the FIFO way
                        if(x > fifoCapacity){
                            surface.getAnnotations().remove(0);
                        }
                    }

                    // Zoom series to fit the viewport
                    surface.zoomExtents();
                    surface2.zoomExtents();
                    ++x;
                }
            });
        }
    };

    Timer timer = new Timer();

    long delay = 0;
    long interval = 10;
    timer.schedule(updateDataTask, delay, interval);

}

}

0 votes
3k views

I’m trying to add custom layout to the tooltip modifier ,but i couldn’t find the solution , also i would like to change the crosshair type behavior on the tool tip ,instead of that i would like to add my own style

0 votes
6k views

Hi,

I am trying to add text annotation on the chart but it doesn’t show. I’m wondering what went wrong with my code.

TextAnnotation textAnnotation = sciChartBuilder.newTextAnnotation()
                .withText("hello")
                .withX1(450)
                .withY1(1)
                .withFontStyle(20, Color.WHITE)
                .build();
        ecgSurface.getAnnotations().add(textAnnotation);
  • Gang Xu asked 3 years ago
  • last active 3 years ago
0 votes
9k views

I try to make a text formatting for my chart on IOS and Android, regarding your documentation:

IOS:
https://www.scichart.com/documentation/ios/current/axis-labels—textformatting-and-cursortextformatting.html
yAxis.textFormatting = “$0.0”

Android:
https://www.scichart.com/documentation/android/current/Axis%20Labels%20-%20TextFormatting%20and%20CursorTextFormatting.html
yAxis.setTextFormatting(“$0.0000”);

I checked my code and its the same like yours. On Android i have:

// yAxis filed with type IAxis
private IAxis yAxis;

// create
yAxis = sciChartBuilder
.newNumericAxis()
.withGrowBy(0.01d, 0.1d)
.withDrawLabels(true)
.withDrawMajorGridLines(true)
.withDrawMinorGridLines(false)
.withDrawMajorBands(false)
.withDrawMajorTicks(false)
.build();

// the set textFormatting:
yAxis.setTextFormatting(“$0.0000”);

On IOS i have:

var yAxis: SCINumericAxis?
self.yAxis = SCINumericAxis()
self.yAxis?.textFormatting = “$0.0”

But it is not working, can you tell me please why? What I’m doing wrong?

0 votes
5k views

Hi,

I’d like to learn how to cancel creating annotation in the OnAnnotationCreatedListener(). Thanks.

annotationCreationModifier.setAnnotationCreationListener(new OnAnnotationCreatedListener() {
        @Override
        public void onAnnotationCreated(IAnnotation iAnnotation) {
            if (outofbound) {
                 // remove current annotation
            }
         }
  • Gang Xu asked 3 years ago
  • last active 3 years ago
0 votes
6k views

Hi,

I want to change the colormap so that the:
– minimum (blue) = 4095
– maximum (red) = 800

Also, I want to set 0 to either black or transparent.

I can easily change the min and max values, just wanting to change the color limit and set 0 = black.

Here is my code for creating the heatmap:

public void heatmap(){
    // Create a SciChartSurface
    SciChartSurface surface = new SciChartSurface(this);
    // Get a layout declared in "activity_main.xml" by id
    LinearLayout chartLayout = findViewById(R.id.chart_layout);
    // Add the SciChartSurface to the layout
    chartLayout.addView(surface);
    // Initialize the SciChartBuilder
    SciChartBuilder.init(this);
    // Obtain the SciChartBuilder instance
    final SciChartBuilder sciChartBuilder = SciChartBuilder.instance();
    final NumericAxis xAxis = sciChartBuilder.newNumericAxis()
            .withGrowBy(0.1, 0.1)
            .build();
    final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
            .withGrowBy(0.1, 0.1)
            .build();
    final FastUniformHeatmapRenderableSeries heatmapRenderableSeries = sciChartBuilder.newUniformHeatmap()
            .withMinimum(4095)
            .withMaximum(800)
            .withCellTextStyle(sciChartBuilder.newFont().withTextSize(8).withTextColor(ColorUtil.White).build())
            .withDrawTextInCell(true)
            .withDataSeries(createDataSeries())
            .build();
    final SciChartSurface chart = surface;
    Collections.addAll(chart.getXAxes(), xAxis);
    Collections.addAll(chart.getYAxes(), yAxis);
    Collections.addAll(chart.getRenderableSeries(), heatmapRenderableSeries);
    Collections.addAll(chart.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers().build());
}
  • Jazz Adams asked 3 years ago
  • last active 3 years ago
0 votes
0 answers
6k views

Hi,
I am new to SciChart and have followed the instructions of tutorial 2 to my own app.

I imported all libraries and then added the code to display a surface (as in tutorial 2) into a layout however nothing displays.

Notes:
– I have activated my license
– If I attempt to run the tutorial 2 code off GitHub the app crashes and no errors displayed in the log.

0 votes
9k views

So far what I know about Scichart is only their given examples, They are really great, what worries me now before I apply for any realtime cryptocurrency data API, I would like to know how to integrate the API to my chart so that I get real time data. If there is any example code with API recommendations I would really appreciate.

0 votes
7k views

From your examples on Github all of them requires databinding which is giving me serious problems. I am running into databinding errors, would you happen to have solutions to that?

0 votes
3k views

We want to create loop graph in android wrap data

0 votes
3k views

Hello there. At the beginning of the program, I define the workspace as w=10 and h=10 units. I set the new workspace to 5×5 in a button event. The new workspace is created but the old 10×10 volume remains on the screen. When I create the new workspace I want the old one to disappear. Thank you in advance for your help. Good work.

My button event.

btnSetNewWH.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
w = 5;
h = 5;
ds3d = new UniformGridDataSeries3D<>(Double.class, Double.class, Double.class, w, h);      

rs1 = sciChart3DBuilder.newSurfaceMeshSeries3D()
        .withDataSeries(ds3d)               
        .withDrawMeshAs(DrawMeshAs.SolidWireframe)
        .withStroke(0xFFE0E0E0)
        .withStrokeThicknes(1f)
        .withMaximum(5000)
        .withDrawSkirt(false)
        .withMeshColorPalette(new GradientColorPalette(colors, stops))
        .withOpacity(1.0f)
        .build();

surface3d.setTheme(R.style.SciChart_ElectricStyle);
surface3d.setCamera(camera);
surface3d.setXAxis(xAxis);
surface3d.setYAxis(yAxis);
surface3d.setIsFpsCounterVisible(false);
surface3d.setZAxis(zAxis);
surface3d.getRenderableSeries().add(rs1);
surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroupWithDefaultModifiers().build());
    }
});
0 votes
12k views

i have been working on line charts and i need to show date as well as time on the axis( 21 june 08 05:30:PM like this).I’ve tried with date axis and numeric axis ,but it doesn’t helps.Do we have any suggestions or samples which could help me

0 votes
10k views

Hi,

I have a valid license key for development. But occasionally the charts show the message below and I have to restart the app to avoid that. May I ask is there a reason for that and how to fix it?

"Sorry! You have not set a License Key. You can request a free trial key from www.scichart.com/licensing-scichart-android or purchase at store.scichart.com."

Thanks,
Gang

  • Gang Xu asked 3 years ago
  • last active 3 years ago
1 vote
11k views

I’m trying to implement sciChart to flutter app (Android). It gets pretty confusing when trying to make it work. Anyone have examples how to make SciChart to work on Flutter? Adding the license works just fine. Only need for ECG chart for now. Thanks.

0 votes
3k views

Hi,

How can we turn the light off and on in 3D drawings in Android studio?

Best regards…

0 votes
12k views

I have a line chart and need to implement textAlign: left property for tickLabel on yAxis. I have found some way to do it on the forum, but it does not work in my case:
xAxis.setAxisTickLabelStyle(new AxisTickLabelStyle(Gravity.CENTER, Layout.Alignment.ALIGN_CENTER, 5, 0, 5, 0));
I get the error:
Alignment cannot be converted to int
But according documentation https://www.scichart.com/documentation/android/current/SciChart.Charting~com.scichart.charting.visuals.axes.AxisTickLabelStyle~_ctor.html AxisTickLabelStyle class get 5 int arguments. Can you help me please how to solve it!

0 votes
0 answers
5k views

Hello,

Today, I tried https://github.com/ABTSoftware/SciChart.Xamarin.Forms repository to my project. ColumnRenderableSeries3D is missing, so I was added by manually. But now I stuck.

I can’t change column width and color.

I know, Xamarin forms actually in plan, but somehow someone can help me, if I share my whole code?

I Attached my image.

0 votes
0 answers
9k views

Hi
Sometimes when I call annotation.setIsHidden in a surface with RenderSurfaceGl, not works.
what should I do?

1 vote
4k views

Hello,
I have a problem with the 3D surface chart. I have used the 3D example from the Example Tutorial as an example. As soon as I make xSize and ySize larger than 128, a gap appears in the respective axes.
Is it possible that these sizes are limited? Or have I made a mistake?

In the attachment you will find the resulting pictures.
The good one has an xSize and ySize of 128 and the bad one 129.

0 votes
4k views

i recently saw documentation about compositeannotation in wpf

do you have same version for android?
how to combine all annotation as one annotation?

0 votes
0 answers
3k views

My chart is dynamic, adding data from the right side all the time, and scrolling the chart to the left. Now the chart can manually scroll to the right indefinitely, but there are many blank areas on the right side. What can I do to limit the range of scrolling to the right? Is there any way to limit the zoom ratio to prohibit the chart from scrolling to the right indefinitely?

0 votes
6k views

My chart is dynamic, adding data from the right side all the time, and scrolling the chart to the left. Now the chart can manually scroll to the right indefinitely, but there are many blank areas on the right side. What can I do to limit the range of scrolling to the right? Is there any way to limit the zoom ratio to prohibit the chart from scrolling to the right indefinitely?

  • WU GUANGYU asked 3 years ago
  • last active 3 years ago
0 votes
4k views

Hi, I just want to make sure

everything inside com.scichart.charting.visual will be considered as VIEW in MVVM pattern right?

thanks

0 votes
4k views

In Scichart Android version 4.2.0.4557, ICategoryLabelProvider.transformDataToIndex(Date var1); accept date as parameter

but at version 4.2.0.4608, int transformDataToIndex(double var1); it accept double?

then how to convert date to double?

and another question.

  1. how set start tick axis in category date axis?
    what i see here first tick of x axis always come with data, not like date axis which data can adapt their position itself.

  2. how to set time frame in date axis like category date axis?

  3. without scichart builder i cannot set time frame in categorydateaxis

0 votes
10k views

I’m evaluating chart libraries to my next project and I’m trying to do a simple chart like the one in the attached image.
It was actually very easy to do it using MPAndroidChart, however it’s been hard to do a simple task like put a label aligned with the column… I did take a look into the SciChart sample application, but the application just uses numeric labels…
Can someone provide some guidance of how to do this?

0 votes
3k views

Hello,

I am having some difficulties using a custom DateTickProvider.

I am trying to offset the values to “anchor” the chart to specific local time (see original question at “https://www.scichart.com/questions/android/axis-value-anchor” for details)

class CustomDateTickProvider() : DateTickProvider() {
    override fun updateTicks(minorTicks: DoubleValues, majorTicks: DoubleValues) {
        // super appears to sometimes recalc based on GMT, and sometimes provide offsets from my previous offsets.
        super.updateTicks(minorTicks, majorTicks) 

       // My offset code here, assumes tick values are GMT based...
    }
}

My code usually works, but sometimes it doesn’t. It appears that when I call super.UpdateTicks(..), it usually generates new ticks based on GMT, but sometimes it simply provides a small offset (like when I pan) based on existing tick values. Is that correct?

Is there a way for me to Force updateTicks to always recalculate based on GMT, or a way for me to tell if updateTicks is recalculating based off GMT or just doing offsets on the existing tick marks?

Or should I be going at this in a different direction?

Thank you.

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

Hello again,

Pardon me if I’m missing something obvious, but I am trying to center align a multiline tick label. I want both lines of the label to be centered. By default they seem to be left-justified. See attached image of current behavior.

xAxis = DateAxis(this)
xAxis.textFormatting = "h:mma\nMMM d" 

Thank you.

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

I’m not sure if I’m understanding the Axes minorsPerMajor behavior correctly, or if this is a Scichart issue.

Using a “vanilla” axis like:

xAxis = DateAxis(this)
xAxis.drawMajorGridLines = false
xAxis.drawMinorGridLines = false
xAxis.drawMajorTicks = true
xAxis.drawMinorTicks = false
xAxis.textFormatting = "h:mma\nMMM d"
xAxis.subDayTextFormatting = "h:mma\nMMM d"
xAxis.minorsPerMajor = 1 // does not change # minor ticks no matter what it is set at, if drawMinorTicks = true
val xAxes: AxisCollection = chartSurface.getXAxes()
xAxes.add(xAxis)

If I set drawMinorTicks=false, I get no minor ticks, as expected. However, if I set it to true, I always get a bunch of ticks, no matter what I set minorsPerMajor to. I want just 1 mnor tick between majors. I’ve attached screenshots of the axis with drawMinorTicks set to both true and false using the above code.

Thanks for your assistance.

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

Hi,
Im tried to convert date into xAxis using this tutorial

https://www.scichart.com/documentation/android/current/webframe.html#Axis%20APIs%20-%20Convert%20Pixel%20to%20Data%20Coordinates.html

but i got this error

Java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object com.scichart.data.numerics.math.IMath.fromDouble(double)' on a null object reference

here my code

https://gist.github.com/ngiyus/4590c009261a28dba2c8b10e123a97f3

0 votes
0 answers
3k views

Hello,

I’m using the recommended function well, thank you.
By the way, can I control the shade shown in the picture?
What I want is not detailed but simple functions such as light On, Off, Up, Down.

Best regards

0 votes
3k views

Hi,

I want to draw the shape of the waveform that stretches out from one point.
I tested it using ‘CreateEllipsoidMesh3DChartFragment’ from example source, but I found problem.

I initialized the displacement value to 0, and entered the displacement value of the point I wanted.
In the image I uploaded, the coordinates are symmetrical, but the shape is different.

Is there a rule that connects coordinates when you draw a triangle?
Is there any way I can control this?

I have attached the image and code.

best regards, Thank you

  • Mobile SW4 asked 3 years ago
  • last active 3 years ago
0 votes
3k views

Hi,
Im tried to convert date into xAxis using this tutorial

https://www.scichart.com/documentation/android/current/webframe.html#Axis%20APIs%20-%20Convert%20Pixel%20to%20Data%20Coordinates.html

but i got this error

Java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object com.scichart.data.numerics.math.IMath.fromDouble(double)' on a null object reference
0 votes
3k views

when loading first data everything goes fine
growby max padding as expected (Image1)

but i added realtime data and data grow, it show strange behaviour, padding more than i expected. (image2)

final IAxis xAxis = sciChartBuilder.newCategoryDateAxis().withVisibleRange(xVisibleRange).withGrowBy(0.1,0.1).build();

ZoomPanModifier zoomPanModifier = new ZoomPanModifier();
zoomPanModifier.setClipModeX(ClipMode.ClipAtExtents);
zoomPanModifier.setClipModeTargetX(ClipModeTarget.MaximumRange);

any workaround? thanks

0 votes
0 answers
3k views

Hi, Yura

Thank you for answer.
But, the dataSeries you told me is not suitable for me.
(The example uses the following data series. EllipsoidDataSeries3D, CustomSurfaceDataSeries3D, CylindroidDataSeries3D, PolarDataSeries3D, UniformGridDataSeries3D)

I want to make it through a data series where I can put coordinates myself, like ‘XyzDataSeries3D’. If you set ‘XyzDataSeries3D’ from ‘FreeSurfaceRenderableSeries3D’, Exception will occur.

For example, what should I do if I want to implement the following shapes as solid?
(0,0,0), (0,0,1), (2,0,0), (2,0,1), (0,3,0), (0,3,1), (2,3,0), (2,3,1).

If the above is not possible, is there a way to draw in 3D chart a triangle as solid connected by the following coordinates?
(x1, y1, z1), (x2, y2, z2), (x3, y3, z3) .
If possible, I think can make a polyhedron by connecting it.

best regards, thank you.

0 votes
4k views

Hi,
How can I programmatically prevent panning, zooming, yaw, pitch movements on the screen whenever I want?

Best regards…

0 votes
3k views

Hello!

I want to draw an irregular polyhedron in 3D chart. And I know the coordinates for each vertex.
However, I couldn’t find the appropriate API.
please, need a API or a guide to help me…

best regards, Thank you

  • Mobile SW4 asked 3 years ago
  • last active 3 years ago
0 votes
3k views

Hello to everyone.

Is it possible to draw the 2d heatmap chart output that appears in pixel shape smoothly? Is there any way to solve this with the current library?

0 votes
0 answers
3k views

Hello there. I am very novice compared to you. As soon as I press a button in the main activty, what should I do to see the data set that I have determined before on the screen?

Thank you from now.

MainActivity code part:

        btn1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mdata = new double[][]{
                    {3, 2, -1.97, -2.81, -0.33, 1.53, 2.04, 2-.08, -1.94, -1.42, -1.58},
                    {-1.77, -1.76, 1.1, 0.26, -0.72, -0.64, -3.26, -3.2, -3.1, -1.94, -1.54},
                    {0, 0, 0, 0, 0, -3.7, -3.7, -3.7, -3.7, 0.48, 0.48},
                    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
            };

            final Camera3D camera = sciChart3DBuilder.newCamera3D().withPosition(-1300, 1300, -1300).build();

            final NumericAxis3D xAxis = sciChart3DBuilder.newNumericAxis3D().withMaxAutoTicks(7).build();
            final NumericAxis3D yAxis = sciChart3DBuilder.newNumericAxis3D().withVisibleRange(-4d, 4d).build();
            final NumericAxis3D zAxis = sciChart3DBuilder.newNumericAxis3D().build();
            final int xSize = 11;
            final int zSize = 4;

            final UniformGridDataSeries3D<Double, Double, Double> ds = new UniformGridDataSeries3D<>(Double.class, Double.class, Double.class, xSize, zSize);
            ds.setStartX(0d);
            ds.setStepX(0.09);
            ds.setStartZ(0d);
            ds.setStepZ(0.75);

            for (int z = 0; z < zSize; z++) {
                for (int x = 0; x < xSize; x++) {
                    ds.updateYAt(x, z, mdata[z][x]);
                }
            }
        }
    });
0 votes
3k views

Hello there. I am very novice compared to you. As soon as I press a button in the main activty, what should I do to see the data set that I have determined before on the screen?

Thank you from now.

MainActivity code part:

        btn1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mdata = new double[][]{
                    {3, 2, -1.97, -2.81, -0.33, 1.53, 2.04, 2-.08, -1.94, -1.42, -1.58},
                    {-1.77, -1.76, 1.1, 0.26, -0.72, -0.64, -3.26, -3.2, -3.1, -1.94, -1.54},
                    {0, 0, 0, 0, 0, -3.7, -3.7, -3.7, -3.7, 0.48, 0.48},
                    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
            };

            final Camera3D camera = sciChart3DBuilder.newCamera3D().withPosition(-1300, 1300, -1300).build();

            final NumericAxis3D xAxis = sciChart3DBuilder.newNumericAxis3D().withMaxAutoTicks(7).build();
            final NumericAxis3D yAxis = sciChart3DBuilder.newNumericAxis3D().withVisibleRange(-4d, 4d).build();
            final NumericAxis3D zAxis = sciChart3DBuilder.newNumericAxis3D().build();
            final int xSize = 11;
            final int zSize = 4;

            final UniformGridDataSeries3D<Double, Double, Double> ds = new UniformGridDataSeries3D<>(Double.class, Double.class, Double.class, xSize, zSize);
            ds.setStartX(0d);
            ds.setStepX(0.09);
            ds.setStartZ(0d);
            ds.setStepZ(0.75);

            for (int z = 0; z < zSize; z++) {
                for (int x = 0; x < xSize; x++) {
                    ds.updateYAt(x, z, mdata[z][x]);
                }
            }
        }
    });
0 votes
9k views

Hello!
I’m trying to migrate OhlcDataSeries from Double to more accurate BigDecimal on Android.
But I faced with an issue that “GenericClass doesn’t support class”

How can I fix it?
I want to use BigDecimal with chart.

Thank you

  • Roman Z asked 3 years ago
  • last active 3 years ago
Showing 101 - 150 of 537 results