hi everyone
when i use utf8 string such as ‘محور’ = axis in persian sciChart lookLike this .
i tried different fonts but did not work .
SciChartBuilder.init(this@Main2Activity)
// Obtain the SciChartBuilder instance
val sciChartBuilder = SciChartBuilder.instance()
val myCustomFont: Typeface? = ResourcesCompat.getFont(this, R.font.maryam)
val fontStyle = FontStyle(myCustomFont, 50f, Color.RED)
val s = String("محور".toByteArray(Charsets.UTF_8))
xAxis = sciChartBuilder.newNumericAxis().withAxisTitleStyle(fontStyle).withAxisTitle(s).withGrowBy(DoubleRange(0.1, 0.1)).build()
yAxis = sciChartBuilder.newNumericAxis().withAxisTitle("this is y").withGrowBy(DoubleRange(0.1, 0.1)).build()
val dataSeries = XyDataSeries(Double::class.javaObjectType, Double::class.javaObjectType)
dataSeries.append(arrayOf(0.0, 2.0, 4.0, 6.0, 8.0, 10.0), arrayOf(1.0, 5.0, -5.0, -10.0, 10.0, 3.0))
rs = sciChartBuilder.newColumnSeries()
.withDataSeries(dataSeries)
.withStrokeStyle(ColorUtil.White, 3f, false)
.build()
surface.chartModifiers.add(sciChartBuilder.newModifierGroupWithDefaultModifiers().build())
UpdateSuspender.using(surface) {
Collections.addAll<IAxis>(surface.xAxes, xAxis)
Collections.addAll<IAxis>(surface.yAxes, yAxis)
Collections.addAll<FastColumnRenderableSeries>(surface.renderableSeries, rs)
}
and the result :
- darius fathi asked 5 years ago
- last active 5 years ago
Hi again,
Is it possible to move the rollover modifier without a touch when I know the x-axis and y-axis values?
At the moment user can tap the chart and the rollover modifier shows up and snaps to the closest point. Then I leave the rollover modifier visible by ignoring the onTouchUp() event. I have an external component that has the same data as the graph and now if user selects an item from that external component I would like to move the rollover modifier to that point. How can I do this?
- Erika Sankari asked 4 years ago
- last active 4 years ago
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.
- vasim simform asked 3 years ago
- last active 2 years ago
Hi,
I have multiple custom chart modifiers (PinchZoom, Rollover, SeriesSelection and ZoomPan) and I was wondering if there is a set order in which they handle the touch event or is it random? If there is a set order then can I change this order?
For example now it seems like the rollover modifier handles the touch event before the seriesSelection modifier. This is a bit problematic since the rollover has sourceMode = SourceMode.SelectedSeries
and since the touch event goes first to the rollover it updates its position –> then the new series is selected –> but rollover position does not update since it has already handled the touch event.
- Erika Sankari asked 4 years ago
- last active 4 years ago
Hi
I want to access the SciTrader application source so that I can implement the features I need by checking it.
Please guide me to access this source code
- Vahid Garousi asked 1 year ago
- last active 1 year ago
Hello
I have this chart with CategoryXAxis` as X and **NumericAxis as Y. I update its IohlcDataseries with new prices for creating a live chart. I also added a HorizontalLineAnnotation on Y-Axis to point to the current price. The problem is when chart auto-scales on Y-axis it only tries to cover price data and not the Line annotation, and its label is half visible.
- niazi curiosity.mobile2 asked 4 years ago
- last active 4 years ago
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!
- Alexander Kishchak asked 3 years ago
- last active 3 years ago
I want to display auto format date on xAxis (DateAxis) while zooming but I cannot find SubDayTextFormatting function.Is there any way to display minutes and seconds after init months ?there is no DateTime Axis on Android like on iOS ..Should I change to CategoryDate Axis?
Thanks in advance
- Guest asked 8 years ago
- last active 9 months ago
Hello there,
I’m trying to implement adding line annotation on touch, but this causes crash.
I’m watching example android app in fragment CreateAnnotationsDynamicallyFragment.
I guess, it should be very easy, but example uses data binding and part of code is hidden somewhere + source code is obfuscated, so it’s hard for me to understand what is wrong.
Can someone give a short example of how to add annotation on touch?
Thanks
Exception:
Process: process_name, PID: 24978
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Comparable com.scichart.charting.visuals.axes.IAxis.getDataValue(float)' on a null object reference
at com.scichart.charting.modifiers.AnnotationCreationModifier.a(SourceFile:203)
at com.scichart.charting.modifiers.AnnotationCreationModifier.onTouchDown(SourceFile:155)
- Kirey Vadim asked 5 years ago
- last active 5 years ago
Hi,
Let me explain the structure of attached views. Default view state is https://imgur.com/a/zqAqpXp .
<VerticalViewPager>
<FirstPagedFragment>
<TradingViewFragment>
<WebView />
</TradingViewFragment>
<SciChartFragment>
<com.scichart.charting.visuals.SciChartSurface />
</SciChartFragment>
</FirstPagedFragment>
<SecondPagedFragment>
...
</ SecondPagedFragment>
</VerticalViewPager>
When FirstPagedFragment is dragged, SecondPagedFragment becomes displayed. You can see it on https://imgur.com/a/2VqZ1HY
The problem is the chart becomes disappeared when ViewPager is on changing state. Here is another link : https://imgur.com/a/xDO6Xtx
It is happened on [Samsung Galaxy S9, API 26] and [Xiaomi Mi A1, API 25] and I did not update displayMetric of chart.
Is there any configuration to fix this issue? Thanks.
All images are attached.
- Changhee Lee asked 6 years ago
- last active 6 years ago
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…
- Julio Olivos asked 7 years ago
- last active 7 years ago
Hi,
I would like to display all the hours of the day in X axis e.g 01 to 24 and I haven’t been able to achieve it yet, I tried use date delta but I couldn’t figure out how it really works, could you please share a code snippet or some example.
Thanks
- Anas Iqbal asked 2 years ago
- last active 2 years ago
Hi,
I have a list of 12 items, but at the start I only want to see the last 6 items on the chart (stacked column chart). I want to be able to scroll / drag to reveal the first part of the list. I use the index of the list for the x-axis, so the list has indexes with range from [0, 11]
I’m having some weird behaviour implementing this.
When the data is loaded, i see the complete bars:
but when I start to scroll, i’m never able to reveal the complete bars anymore:
![Screenshot 2020-09-18 at 11.04.40.png][2]
![Screenshot 2020-09-18 at 11.04.59.png][3]
When i start scrolling to the end (although the chart is already at the end), the UI jumps and only shows half a bar. Also when i scroll to the beginning, it only shows half a bar.
How can I make sure I always see the complete bars?
This is the code, specific to the x axis & the scrolling:
val xAxis = sciChartBuilder.newNumericAxis()
.withDrawMajorBands(false)
.withDrawMajorGridLines(false)
.withDrawMinorGridLines(false)
.withDrawMinorTicks(false)
.withMajorDelta(1.0)
.withMinorDelta(0.2)
.withAutoTicks(false)
.withVisibleRange(5.5, 11.5)
.build()
using half values for the range seems to be the only way I can see the full bars. Once I start scrolling I only see half bars at the start & end
val surfaceChartModifiers: ChartModifierCollection = chart.chartModifiers
val dragModifier = XAxisDragModifier()
dragModifier.dragMode = AxisDragModifierBase.AxisDragMode.Pan
surfaceChartModifiers.add(dragModifier)
val zoomPanModifier = ZoomPanModifier()
zoomPanModifier.clipModeX = ClipMode.ClipAtExtents
zoomPanModifier.direction = Direction2D.XDirection
zoomPanModifier.zoomExtentsY = false
surfaceChartModifiers.add(zoomPanModifier)
- Wesley Huyghe asked 4 years ago
- last active 4 years ago
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
- Amir Khan asked 2 years ago
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.
- Julio Olivos asked 7 years ago
- last active 7 years ago
We are working on an android based ELD application. We are looking for a ELD graph. Is it possible to accomplish this using SCICHART?
- saiesh raut asked 2 years ago
- last active 5 months ago
Hi
Sometimes when I call annotation.setIsHidden in a surface with RenderSurfaceGl, not works.
what should I do?
- abolfazl ghanbari asked 3 years ago
Hi, i want to make something like that : https://i.ibb.co/617TmD2/screenshot-line.png
I have tried HorizontalLineAnnotation but i successed to have it only on bottom graph : https://i.ibb.co/qsCjjGd/screen-bot-graph.png
Here how i initialize my top graph :
@Override
public void initGraph(Context context) {
Log.d(TAG, "initGraphs");
SciChartSurface spectogramSciChart = new SciChartSurface(context);
spectogram.addView(spectogramSciChart);
xAxis = new NumericAxis(context);
xAxis.setAutoRange(AutoRange.Always);
xAxis.setDrawMinorTicks(false);
xAxis.setDrawMajorBands(false);
xAxis.setDrawMinorGridLines(false);
xAxis.setAxisAlignment(AxisAlignment.Left);
xAxis.setFlipCoordinates(true);
xAxis.setAxisTitle("Frequences (KHz)");
xAxis.setAxisTitleOrientation(AxisTitleOrientation.VerticalFlipped);
spectogramSciChart.getXAxes().add(xAxis);
yAxis = new NumericAxis(context);
yAxis.setVisibleRange(new DoubleRange(startSpectrogramRange, endSpectrogramRange));
yAxis.setDrawLabels(false);
yAxis.setDrawMinorTicks(false);
yAxis.setDrawMajorBands(false);
yAxis.setDrawMinorGridLines(false);
yAxis.setAxisAlignment(AxisAlignment.Bottom);
yAxis.setFlipCoordinates(true);
yAxis.setAxisTitleOrientation(AxisTitleOrientation.Horizontal);
spectogramSciChart.getYAxes().add(yAxis);
FastUniformHeatmapRenderableSeries f = new FastUniformHeatmapRenderableSeries();
scichartTools.getSpectrogramDS().setStartX(0f);
scichartTools.getSpectrogramDS().setStepX(0.9f);
f.setDataSeries(scichartTools.getSpectrogramDS());
f.setMaximum(100);
f.setMinimum(-30.0);
f.setColorMap(new ColorMap(
new int[]{ColorUtil.Transparent, ColorUtil.DarkBlue, ColorUtil.Purple, ColorUtil.Red, ColorUtil.Yellow, ColorUtil.White},
new float[]{0f, 0.0001f, 0.25f, 0.50f, 0.75f, 1f}
));
spectogramSciChart.getRenderableSeries().add(f);
scichartTools.getSpectrogramValues().setSize(scichartTools.getFftSize() * scichartTools.getBatchSize() * 2);
// I add the line but it's not displayed
HorizontalLineAnnotation horizontalLine = new HorizontalLineAnnotation(context);
horizontalLine.setHorizontalGravity(Gravity.FILL_HORIZONTAL);
horizontalLine.setY1(5f);
horizontalLine.setLabelValue("Label");
spectogramSciChart.getAnnotations().add(horizontalLine);
}
You can see at the bottom of the function that i added it, but it doesn’t work on this graph. Why ? Maybe the graph is drawing over my line ?
Thanks,
Best regards
- damien gaillard asked 5 years ago
- last active 5 years ago
I’m seeing a crash log that happens only some times (it’s not consistently reproducible) that looks like this:
libc F FORTIFY: pthread_mutex_lock called on a destroyed mutex
libc F Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10371 (GLThread), pid 9832
DEBUG F #00 pc 00000000000531f4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #01 pc 000000000005507c /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+124) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #02 pc 00000000000c360c /apex/com.android.runtime/lib64/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+60) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #03 pc 00000000000c34a0 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+208) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #04 pc 0000000000833ac8 /vendor/lib64/egl/libGLES_mali.so (eglp_try_display_finish_terminating+88) (BuildId: 556d636a49f8475a)
F #05 pc 000000000083f268 /vendor/lib64/egl/libGLES_mali.so (eglp_release_tls+232) (BuildId: 556d636a49f8475a)
F #06 pc 00000000000c2c8c /apex/com.android.runtime/lib64/bionic/libc.so (pthread_key_clean_all()+124) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #07 pc 00000000000c2408 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_exit+72) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #08 pc 00000000000c2270 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: dc4001c2ef2dfc23467040797a96840c)
F #09 pc 0000000000054a30 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: dc4001c2ef2dfc23467040797a96840c)
Any idea what could be happening?
- Marcela Guerra asked 1 year ago
Hi,
I’m working on the iOS and android version. I’m trying to implemented an animated visible range change on Y axis when zooming/panning X axis.
On iOS, I just have to do:
yAxis.autoRange = .always
yAxis.animateVisibleRangeChanges = true
yAxis.animatedChangeDuration = 0.5
But I can’t find a way to do that on Android, is it hidden somewhere else?
Kind Regards,
Alexis
- Alexis Durand asked 6 years ago
- last active 6 years ago
I have two questions on rollover modifier.
One is the tooltip of the rollover is right under the finger on a heatmap chart. Can I move it to the top left section of the touch point?
Second question is how can I implement a callback function whenever Y axis of the rollover modifier changes?
Thanks for your attention in advance.
- Gang Xu asked 4 years ago
- last active 4 years ago
So I am trying to set paddings on the chart, so that the data series do not touch chart edges
I can’t do it with View’s method setPadding because then the black background is present (screenshot shows padding on all sides but I need just left and right)
Also, I managed to achieve no labels, axes, grids etc. but in totally hacky way; I set .withIsCenterAxis and then all other things to false
.withAxisId(Y_AXIS_ID)
.withDrawMajorBands(false)
.withDrawMajorGridLines(false)
.withDrawMinorGridLines(false)
.withDrawLabels(false)
.withIsCenterAxis(true)
.withDrawMajorTicks(false)
.withDrawMinorTicks(false)
Is there a normal way of doing this?
thanks
- Laszlo Bonkers asked 5 years ago
- last active 5 years ago
Hello all,
I’ve a question about the android chart,
I’ve see WPF include fft plotting support, but I didn’t see it in android ?
can you tell me if the android scichart have it ?
thanks
- Davy Thibaut asked 8 years ago
- last active 8 years ago
Hi, I want to draw a chart like the attached image.
This is a chart with XyDataSeries, it show as vertical line at each data point and verticle line is a dotted line in order to separated from other series.
Since the OHLC chart will have the open, close on the data point and an impulse chart is forced to draw from an axis, is there any better way that can achieve a series like this? Thank you!
- may lym asked 4 years ago
- last active 4 years ago
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.
- Valeri Haataja asked 3 years ago
- last active 6 months ago
Hi
I have a ECG chart with a certain capacity.
I want to apply the fading animation to the part of the chart that is being cleared.
- abolfazl ghanbari asked 4 years ago
- last active 4 years ago
Hello
I was wondering if it would be possible to create a simple clean looking chart like described in the attached image. I am looking for a “SuccessRateChart” that has some similarity to the PieChart but does not use the whole circle to describe its content. I would also need a way to adjust the visible radius of the Pie. In means of information visualization you often hear the term “doughnut chart”…
On way could be to draw some circle stacked over the chart itself, but there should be a better solution.
Would love to hear from you,
Kind regards,
Stephan
- Stephan Raible asked 4 years ago
- last active 4 years ago
I have a question about the scichart performance. I need to display a lot of data on the real time chart and above 2400000 values the chart crops and reacts very slowly. It was tested on Samsung s7. Does scichart handle that much data on devices? Is there any minimum phone performance requirements?
- al luk asked 6 years ago
- last active 6 years ago
I’m seeing the following exception:
E/Exception: null
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at com.scichart.core.model.DoubleValues.get(SourceFile:167)
at com.scichart.charting.numerics.tickProviders.LogarithmicNumericTickProvider.updateTicks(SourceFile:94)
at com.scichart.charting.numerics.tickProviders.TickProvider.update(SourceFile:59)
at com.scichart.charting.numerics.tickProviders.DeltaTickProvider.update(SourceFile:81)
at com.scichart.charting.visuals.axes.AxisBase.onUpdateMeasure(SourceFile:957)
at com.scichart.charting.visuals.axes.AxisBase.updateAxisMeasurements(SourceFile:936)
at com.scichart.charting.layoutManagers.RightAlignmentOuterAxisLayoutStrategy.measureAxes(SourceFile:39)
at com.scichart.charting.layoutManagers.DefaultLayoutManager.onLayoutChart(SourceFile:235)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:207)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:132)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:234)
at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:299)
at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:283)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
I’m initializing my chart as follows:
SciChartBuilder.init(context)
builder = SciChartBuilder.instance()
...
val xAxis = builder.newCategoryDateAxis()
.withGrowBy(0.0, 0.05)
.withAxisAlignment(AxisAlignment.Bottom)
.withVisibleRange(sharedXRange)
.withDrawMinorGridLines(true)
.withDrawMajorGridLines(true)
.build()
val yAxis = builder.newLogarithmicNumericAxis()
.withTextFormatting("#.#E+0")
.withScientificNotation(ScientificNotation.LogarithmicBase)
.withLogarithmicBase(2.0)
.build()
val seriesData = builder.newXyDataSeries(Date::class.java, Double::class.javaObjectType)
.withSeriesName("Series A")
.build()
seriesData.append(data.dateData, data.yData)
series = builder.newLineSeries()
.withDataSeries(seriesData)
.build()
UpdateSuspender.using(surface) {
Collections.addAll(surface.xAxes, xAxis)
Collections.addAll(surface.yAxes, yAxis)
Collections.addAll(surface.renderableSeries, series)
}
data object has about 300 valid data points.
Any ideas what’s going on? I tried running this on a new activity. If I swap LogarithmicNumericAxis for a NumericAxis, everything works fine. I looked at the decompiled .class file where the crash was occurring (I don’t have the source for SciChart), and it seems like the crash occurs when major ticks fail to get generated (majorTicks.size == 0). I tried disabling all minor/major ticks but no joy.
for(int var22 = majorTicks.size(); var22 >= 0; --var22) {
double var23 = var4.fromExponent(var11);
double var25 = var22 < majorTicks.size() ? majorTicks.get(var22) : majorTicks.get(var22 - 1) * var23;
- Mike Liu asked 6 years ago
- last active 6 years ago
Hello
Currently trying this:
final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
.withAutoRangeMode(AutoRange.Never)
.withTextFormatting("#.0000")
.withVisibleRangeLimit(1.143, 1.146)
.build();
Works perfectly with values .withVisibleRangeLimit(1.14, 1.15), but every time i go for more precision – range is default 0-10
Please help
Edit:
Also works fine with
.withVisibleRangeLimit(1.1433, 1.1566)
Question 2.
Is there a way to determine that live chart was scrolled by finger or by animation (when adding new point)?
- Kirey Vadim asked 5 years ago
- last active 5 years ago
In financial markets, there is a type of chart that is as follows.
I did not find this type of chart in SciChart.
Please help me how to draw this chart
- Vahid Garousi asked 1 year ago
- last active 1 year ago
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.
- Julio Olivos asked 7 years ago
- last active 7 years ago
Hello! I want to create an AxisMarkerAnnotation but the padding doesn’t match the position of the text on the axis – I would like to align it and what is the way to do it? couldn’t find the right settings
- Sergey Evdokimov asked 12 months ago
- last active 12 months ago
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.
- Ivan Schütz asked 7 years ago
- last active 7 years ago
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
- Amir Khan asked 2 years ago
How to scale axes with different scale factor using pinch zoom?
For example, scale x axis only or scale x axis greater then y axis.
- Dmitry Kozhin asked 7 years ago
- last active 3 months ago
I’m using a CategoryDateAxis and seeing the following crash many times in production. The issue is that SciChart is not synchronizing access to SimpleDateFormat, and this will lead to a crash.
Please see following thread for more details on how to fix this issue:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6231579
Crash log:
java.lang.ArrayIndexOutOfBoundsException: length=6; index=-4
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2411)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2321)
at java.util.Calendar.setTimeInMillis(Calendar.java:1787)
at java.util.Calendar.setTime(Calendar.java:1749)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:981)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
at java.text.DateFormat.format(DateFormat.java:341)
at com.scichart.charting.numerics.labelProviders.TradeChartAxisLabelFormatter.formatLabel(SourceFile:124)
at com.scichart.charting.numerics.labelProviders.FormatterLabelProviderBase.formatLabel(SourceFile:70)
at com.scichart.charting.numerics.labelProviders.CategoryLabelProviderBase.formatLabel(SourceFile:113)
at com.scichart.charting.visuals.axes.AxisBase.formatText(SourceFile:1142)
at com.scichart.charting.visuals.axes.AxisInfo.update(SourceFile:87)
at com.scichart.charting.visuals.axes.AxisTooltip.update(SourceFile:83)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.a(SourceFile:84)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.updateXAxisTooltip(SourceFile:62)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.a(SourceFile:165)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.onUpdate(SourceFile:158)
at com.scichart.charting.modifiers.TooltipModifierWithAxisLabelsBase.handleMasterTouchMoveEvent(SourceFile:190)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.a(SourceFile:129)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.execute(SourceFile:125)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.a(SourceFile:70)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.onTouchMove(SourceFile:59)
at com.scichart.charting.modifiers.TouchModifierBase.onTouch(SourceFile:44)
at com.scichart.charting.modifiers.ModifierGroup.onTouch(SourceFile:189)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1251)
at android.view.View.dispatchTouchEvent(View.java:11776)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2962)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2643)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
09-02 01:42:23.356 17621-17621/? E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
at android.app.Activity.dispatchTouchEvent(Activity.java:3307)
at android.support.v7.view.i.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at android.support.v7.view.i.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:12015)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4795)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4609)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6661)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6635)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6596)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6764)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:177)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6735)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6787)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:652)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
09-02 01:42:35.433 2145-2162/? E/BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
Another crash:
java.lang.ArrayIndexOutOfBoundsException: length=13; index=15
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2411)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2321)
at java.util.Calendar.setTimeInMillis(Calendar.java:1787)
at java.util.Calendar.setTime(Calendar.java:1749)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:981)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
at java.text.DateFormat.format(DateFormat.java:341)
at com.scichart.charting.numerics.labelProviders.TradeChartAxisLabelFormatter.formatLabel(SourceFile:124)
at com.scichart.charting.numerics.labelProviders.FormatterLabelProviderBase.formatLabel(SourceFile:70)
at com.scichart.charting.numerics.labelProviders.CategoryLabelProviderBase.formatLabel(SourceFile:113)
at com.scichart.charting.visuals.axes.AxisBase.formatText(SourceFile:1142)
at com.scichart.charting.visuals.axes.AxisInfo.update(SourceFile:87)
at com.scichart.charting.visuals.axes.AxisTooltip.update(SourceFile:83)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.a(SourceFile:84)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehavior.updateXAxisTooltip(SourceFile:62)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.a(SourceFile:165)
at com.scichart.charting.modifiers.behaviors.AxisTooltipsBehaviorBase.onUpdate(SourceFile:158)
at com.scichart.charting.modifiers.TooltipModifierWithAxisLabelsBase.handleMasterTouchMoveEvent(SourceFile:190)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.a(SourceFile:129)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase$1.execute(SourceFile:125)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.a(SourceFile:70)
at com.scichart.charting.modifiers.MasterSlaveTouchModifierBase.onTouchMove(SourceFile:59)
at com.scichart.charting.modifiers.TouchModifierBase.onTouch(SourceFile:44)
at com.scichart.charting.modifiers.ModifierGroup.onTouch(SourceFile:189)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1251)
at android.view.View.dispatchTouchEvent(View.java:11779)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2965)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2643)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
09-03 00:01:08.300 21932-21932/co.mikeliu.stocks E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2971)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1834)
at android.app.Activity.dispatchTouchEvent(Activity.java:3312)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:12018)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4829)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4643)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4234)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4327)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4208)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4384)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4234)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4208)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4181)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6755)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6694)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6655)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6858)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:193)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:184)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6829)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6881)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:652)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6545)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809)
- Mike Liu asked 6 years ago
- last active 6 years ago