Hi,
I have annotation, users can it drag and drop. But for it first need select this annotation and after drag it(with re-touching).
How to immediately drag annotation(without re-touching)?
Thanks in advance.
Regards,
Batyr
- Batyr Batyr asked 2 years ago
I am currently working on a chart that shows data in minutes.
As shown in the attached photo, I would like to create a tick label for every minute and bold the labels for the 5 minute ticks. Is this possible?
- JaiHoon Park asked 5 months ago
- last active 4 months ago
Between these two which one should I use, and what different between these.
- Tang Chanrith asked 7 years ago
- last active 7 years ago
Hello,
As you can see in the attached image, I’m using a Candlestick Chart for a financial application, but the gap between each bar on the chart is pretty small and it doesn’t look good.
I want to add a space between the bars but I couldn’t find how to do it. Can you help me?
Best regards.
- devrim çatak asked 1 year ago
- last active 1 year ago
I applied alpha color to FastLineRenderableSeries, but it was not visible. On the other hand, FastColumnRenderableSeries works well with alpha color. Please check the issue.
Example Code
class AlphaChart {
private val colorAlpha00 = ColorUtil.argb(0x00, 0xFF, 0xCC, 0x80) // 0%
private val colorAlpha1A = ColorUtil.argb(0x1A, 0xFF, 0xCC, 0x80) // 10%
private val colorAlpha33 = ColorUtil.argb(0x33, 0xFF, 0xCC, 0x80) // 20%
private val colorAlpha4D = ColorUtil.argb(0x4D, 0xFF, 0xCC, 0x80) // 30%
private val colorAlpha66 = ColorUtil.argb(0x66, 0xFF, 0xCC, 0x80) // 40%
private val colorAlpha80 = ColorUtil.argb(0x80, 0xFF, 0xCC, 0x80) // 50%
private val colorAlpha99 = ColorUtil.argb(0x99, 0xFF, 0xCC, 0x80) // 60%
private val colorAlphaB3 = ColorUtil.argb(0xB3, 0xFF, 0xCC, 0x80) // 70%
private val colorAlphaCC = ColorUtil.argb(0xCC, 0xFF, 0xCC, 0x80) // 80%
private val colorAlphaE6 = ColorUtil.argb(0xE6, 0xFF, 0xCC, 0x80) // 90%
private val colorAlphaFF = ColorUtil.argb(0xFF, 0xFF, 0xCC, 0x80) // 100%
fun initAlphaChart(surface: SciChartSurface) {
surface.suspendUpdates {
theme = R.style.SciChart_Alpha
xAxes {
numericAxis {
autoRange = AutoRange.Always
growBy = DoubleRange(0.1, 0.1)
}
}
yAxes {
numericAxis {
autoRange = AutoRange.Always
growBy = DoubleRange(0.2, 0.2)
}
}
renderableSeries {
fastColumnRenderableSeries {
dataSeries = createDataSeries(2.0)
paletteProvider = AlphaPaletteProvider()
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.0)
strokeStyle = SolidPenStyle(colorAlpha00, 2f) // 0% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.1)
strokeStyle = SolidPenStyle(colorAlpha1A, 2f) // 10% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.2)
strokeStyle = SolidPenStyle(colorAlpha33, 2f) // 20% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.3)
strokeStyle = SolidPenStyle(colorAlpha4D, 2f) // 30% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.4)
strokeStyle = SolidPenStyle(colorAlpha66, 2f) // 40% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.5)
strokeStyle = SolidPenStyle(colorAlpha80, 2f) // 50% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.6)
strokeStyle = SolidPenStyle(colorAlpha99, 2f) // 60% - Not Visible
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.7)
strokeStyle = SolidPenStyle(colorAlphaB3, 2f) // 70%
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.8)
strokeStyle = SolidPenStyle(colorAlphaCC, 2f) // 80%
}
fastLineRenderableSeries {
dataSeries = createDataSeries(3.9)
strokeStyle = SolidPenStyle(colorAlphaE6, 2f) // 90%
}
fastLineRenderableSeries {
dataSeries = createDataSeries(4.0)
strokeStyle = SolidPenStyle(colorAlphaFF, 2f) // 100%
}
}
chartModifiers {
rolloverModifier {}
}
}
}
private fun createDataSeries(yValues: Double): XyDataSeries<Int, Double> {
return XyDataSeries<Int, Double>().apply {
for (index in 1..10) {
append(index, yValues)
}
}
}
}
class AlphaPaletteProvider :
PaletteProviderBase<FastColumnRenderableSeries>(FastColumnRenderableSeries::class.java),
IFillPaletteProvider, IStrokePaletteProvider {
private val colorAlpha00 = ColorUtil.argb(0x00, 0xFF, 0xCC, 0x80) // 0%
private val colorAlpha1A = ColorUtil.argb(0x1A, 0xFF, 0xCC, 0x80) // 10%
private val colorAlpha33 = ColorUtil.argb(0x33, 0xFF, 0xCC, 0x80) // 20%
private val colorAlpha4D = ColorUtil.argb(0x4D, 0xFF, 0xCC, 0x80) // 30%
private val colorAlpha66 = ColorUtil.argb(0x66, 0xFF, 0xCC, 0x80) // 40%
private val colorAlpha80 = ColorUtil.argb(0x80, 0xFF, 0xCC, 0x80) // 50%
private val colorAlpha99 = ColorUtil.argb(0x99, 0xFF, 0xCC, 0x80) // 60%
private val colorAlphaB3 = ColorUtil.argb(0xB3, 0xFF, 0xCC, 0x80) // 70%
private val colorAlphaCC = ColorUtil.argb(0xCC, 0xFF, 0xCC, 0x80) // 80%
private val colorAlphaE6 = ColorUtil.argb(0xE6, 0xFF, 0xCC, 0x80) // 90%
private val colorAlphaFF = ColorUtil.argb(0xFF, 0xFF, 0xCC, 0x80) // 100%
private val colors = IntegerValues(
intArrayOf(
colorAlpha00,
colorAlpha1A,
colorAlpha33,
colorAlpha4D,
colorAlpha66,
colorAlpha80,
colorAlpha99,
colorAlphaB3,
colorAlphaCC,
colorAlphaE6,
colorAlphaFF
)
)
override fun update() {}
override fun getFillColors(): IntegerValues = colors
override fun getStrokeColors(): IntegerValues = colors
}
- Jeong HaMin asked 2 months ago
- last active 2 months ago
Right now i’m using trial version but i’m looking forward to buy full version as to integrate the charts in my app . I am building an real time chart that update data according to time , which means simply i need Time on the x axis and numeric values on the y axis , but i’m not getting any hint how to get the time values on the x axis .
- Abhishek Sadana asked 8 years ago
- last active 8 years ago
Hi all,
Bit of a weird question here again – sorry.
I’m not sure if this is possible, but I’m looking to have an android device take pictures every x minutes, and I’d like to display them in a chart with a shared axis with a few other charts. A user will ideally be able to see each of these snapshots associated with the time that they’re taken, and on press expand them into a carousel view with the selected image as the current.
The on press and carousel bit will be straight android code, but I was wondering about displaying images on charts – is it possible? I poked around a little bit, and for WPF, I saw
https://www.scichart.com/questions/question/rendering-2d-camera-images
I was wondering if the android libraries can do similar, and if so, do you have any examples/code snippets?
The other potential approach I found was using the Sprite point marker API, although I’m not sure the scope of images it can render?
Would either of these approaches be feasible, and do you have any examples/tips? Attached is the current status of my charts, and I’m hoping to put images in the red boxes on the second chart (I just put a column chart as a placeholder there for the moment).
Also, I just wanted to say thanks for all the fantastic support your team has provided.
Thanks,
-Andy
- Andrew Chin asked 5 years ago
- last active 5 years ago
Hello,
I am developing a finance application and I am using AnimatingLineChart for it. I want prices like tickLine to be displayed instantly on this screen. But I’m having 2 problems while developing.
1- As I have included in the screenshot, the price movement seems to be in a straight line because the y-axis ranges are too much. I want to reduce the range here and show the price action in a healthier way. In the screenshot, the blue color is the graph drawn by the line graph, and the red color is the graph I want to draw. I create a very low range when determining the range, but this is not reflected in the chart. I am attaching the code I used below;
final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
.withVisibleRange(new DoubleRange(1.095, 1.096))
.withGrowBy(new DoubleRange(0.1d, 0.1d))
.build();
2- Can I do this without entering a min and max value for Y axis while using this chart type? I want to create a structure in which it will dynamically determine the max and min values according to the price data it receives.
Do you have any suggestions for improving these or a better graphic type for it?
Thank you and have nice work.
- devrim çatak asked 1 year ago
- last active 1 year ago
Hi,
We want to implement averaging of data points when you zoom into a graph.
We have implemented pre-processed average plotting – and this works for certain cases.
Basically, you see less point markers when you zoom out a certain level (point marker will show averaged points), and when you zoom in, point markers show increased sample points – in real time.
- Is there a an API that enables this capability and determining when the averaging happens (at what zoom level) and the averaging period (to average values over)?
- If there isn’t an API, can you point us in the right direction to implement such feature?
- Eyram Dornor asked 2 years ago
- last active 4 months ago
Hi ,
I’m encountering a critical problem with the SciChart library. The issue seems related to the loading of native methods, specifically Java_com_scichart_charting_numerics_coordinateCalculators_FlippedDoubleCoordinateCalculator_nativeGetCoordinates.
Development Environment:
SciChart Version: 4.4.0-nightly.4744
Library Type: Android
Android Version: Android 13
Release Method: Play Store Download
Debug/Release Modes: Not Reproducible in Direct Android Studio Build
I’ve reviewed the code and documentation but couldn’t pinpoint the issue. I need help with:
1. Confirming the correct loading of the SciChart library.
2. Suggestions for troubleshooting to identify why the native method invocation is failing.
3. Any updates or configurations needed for proper SciChart library integration.
Thanks
Raja Debbarmann
- Raja Debbarmann asked 5 months ago
- last active 5 months ago
How to create the order book depth chart with SciChart?
- Nizzle Bizzle asked 5 years ago
- last active 5 years ago
Hello,
I am using a candlestick chart for a financial application and I want to add the sign and price to the highest and lowest price bar that appears on the screen as in the attached image. As the chart is scrolled, the highest price and lowest price data and location should also change. how can I do that?
Best regards.
- devrim çatak asked 1 year ago
- last active 4 months ago
I want to change the color of the fill bellow the chart(with blue using line chart,FastMountainRenderableSeries etc) but I have problem with defining the BrushStyle and it wont apply on chart(issue with color define-initPaint).Should I change the function ?or how to change default area color ?
- Guest asked 8 years ago
- last active 8 years ago
Hello everyone,
I am the beginner of SciChart, now I able to create a candlestick chart with a HorizontalLineAnnotation but it doesn’t display well.
I have checked-out this tutorial
https://www.scichart.com/documentation/v5.x/webframe.html#The%20HorizontalLineAnnotation%20Type.html
I tried to convert the C# code and XML document to Kotlin but it seems there are no class AnnotationLabel found from the library.
Bellow is my screenshot
You can see the issue is the HorizontalLineAnnotation doesn’t contain the label (with value). What I need is it should have a label as bellow
Bellow is my implementation (in Kotlin)
val xAxis = sciChartBuilder.newCategoryDateAxis().build()
val yAxis = sciChartBuilder
.newNumericAxis()
.build()
val currentAnnotation = sciChartBuilder
.newHorizontalLineAnnotation()
.withBackgroundColor(0xFFFCB51E.toInt())
.withYValue(currentValue).build()
val rSeries = sciChartBuilder.newCandlestickSeries()
.withStrokeUp(upColor)
.withFillUpColor(upColor)
.withStrokeDown(downColor)
.withFillDownColor(downColor)
.withDataSeries(dataSeries)
.build()
UpdateSuspender.using(surface) {
Collections.addAll(surface.xAxes, xAxis)
Collections.addAll(surface.yAxes, yAxis)
Collections.addAll(surface.annotations, currentAnnotation)
Collections.addAll(surface.renderableSeries, rSeries)
Collections.addAll(surface.chartModifiers, sciChartBuilder.newModifierGroupWithDefaultModifiers().build())
}
Can someone please help me on this?
- Vo Hoa asked 6 years ago
- last active 6 years ago
I am moving from MPAndroidChart to SciChart but I am also required to provide the same look and feel on the chart produced.
In this app the line chart has three lineCollections vertically offset from each other in MPAndroidChart i could use the charts getHighLighter().getHightLight(x, y) to retrieve a list of the three HighLighted points. This information is then used to display detailed information on those points in a popup panel not part of the chart.
Further to this the highLighting only happens after a longClick where the HigHlight Lines and the popup info panel then appear. Chart scrolling is also disabled. The popup info panel is then updated with the point information as the highlight moves.
Upon touchUp the highlight and popup info disappear and chart scrolling is then enabled.
The RolloverModifier appears to provide the required highlighting but I am confused on how to get the points currently highlighted.
- Simon Barnes asked 6 years ago
- last active 6 years ago
I am using a PinchZoomModifier with my chart and I would like to execute some code when the user stops the zooming action (stops touching the screen). Is it possible to do? Are there any listeners I could attach to the PinchZoomModifier? I couldn’t find any in the docs.
- MIha Rozina asked 5 years ago
- last active 5 years ago
I have been following the tutorials and in Tutorial 3 I have come to the point where data is added to an XyDataSeries and need to know the proper way to do it in Kotlin on Android (not Java).
In MainActivity.kt I have:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
SciChartSurface.setRuntimeLicenseKey("...");
val surface = SciChartSurface(this)
val chartLayout = findViewById<View>(R.id.chart_layout) as LinearLayout
chartLayout.addView(surface)
SciChartBuilder.init(this)
val sciChartBuilder = SciChartBuilder.instance()
val xAxis = sciChartBuilder.newNumericAxis()
.withAxisTitle("X Axis Title")
.withVisibleRange(-5.0, 15.0)
.build();
val yAxis = sciChartBuilder.newNumericAxis()
.withAxisTitle("Y Axis Title")
.withVisibleRange(0.0, 100.0)
.build();
val textAnnotation = sciChartBuilder.newTextAnnotation()
.withX1(5.0)
.withY1(55.0)
.withText("Hello World!")
.withHorizontalAnchorPoint(HorizontalAnchorPoint.Center)
.withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withFontStyle(20f, ColorUtil.White)
.build()
val chartModifiers = sciChartBuilder.newModifierGroup()
.withPinchZoomModifier().withReceiveHandledEvents(true).build()
.withZoomPanModifier().withReceiveHandledEvents(true).build()
.build()
// App crashes at the following point
val lineData: XyDataSeries<Int, Double> = sciChartBuilder.newXyDataSeries(
Int::class.java,
Double::class.java
).build()
// I presume this is also incorrect
val scatterData: XyDataSeries<Int, Double> = sciChartBuilder.newXyDataSeries(
Int::class.java,
Double::class.java
).build()
for (i in 0..999) {
lineData.append(i, Math.sin(i * 0.1))
scatterData.append(i, Math.cos(i * 0.1))
}
val lineSeries = sciChartBuilder.newLineSeries()
.withDataSeries(lineData)
.withStrokeStyle(ColorUtil.LightBlue, 2f, true)
.build();
surface.renderableSeries.add(lineSeries);
Collections.addAll(surface.yAxes, yAxis);
Collections.addAll(surface.xAxes, xAxis);
Collections.addAll(surface.annotations, textAnnotation);
Collections.addAll(surface.chartModifiers, chartModifiers);
}
}
The app crashes at the lines “val lineData: XyDataSeries<Int, Double> = sciChartBuilder.newXyDataSeries( …”. What is wrong here?
- David Fleener asked 2 years ago
- last active 2 years ago
Hi.
My colleagues have used on their WPF application SciChartScrollbar to select a portion of a created graph. I want to use the same behavior on Xamarin.Android. What can I use to have the same effect?
Thank you.
- Victor Boieru asked 5 months ago
- last active 3 months ago
Hello,
I have this app : https://i.ibb.co/sPXMbf1/screenshot-framed-1.png
I would like the graph below (the XyDataSeries) to be drawn from right to left (currently it is drawn from left to right)
I have this function to draw :
val audioDS = XyDataSeries<Int, Short>().apply { fifoCapacity = audioStreamBufferSize }
fun generateAudioStream(buffer: ShortValues) {
val longs = IntegerValues(buffer.size())
longs.setSize(buffer.size())
for (i in 0 until buffer.size()) {
longs[i] = time++
}
audioDS.append(longs, buffer)
}
And my graph is initialized like this :
@Override
public void initGraph(Context context) {
Log.d(TAG, "initGraphs");
SciChartSurface audioStreamSciChart = new SciChartSurface(context);
mAudiostream.addView(audioStreamSciChart);
xAxis = new NumericAxis(context);
xAxis.setVisibleRange(new DoubleRange(startAudioStreamRange, endAudioStreamRange));
xAxis.setDrawLabels(false);
xAxis.setDrawMinorTicks(false);
xAxis.setDrawMajorBands(false);
xAxis.setDrawMinorGridLines(false);
audioStreamSciChart.getXAxes().add(xAxis);
NumericAxis yAxis = new NumericAxis(context);
yAxis.setVisibleRange(new DoubleRange(new DoubleRange((double) Short.MIN_VALUE, (double) Short.MAX_VALUE)));
yAxis.setDrawLabels(true);
yAxis.setDrawMinorTicks(false);
yAxis.setDrawMajorBands(false);
yAxis.setDrawMinorGridLines(false);
yAxis.setAxisAlignment(AxisAlignment.Left);
audioStreamSciChart.getYAxes().add(yAxis);
float lineThickness = SciChartExtensionsKt.dip(context, 1.0F);
FastLineRenderableSeries f = new FastLineRenderableSeries();
f.setDataSeries(scichartTools.getAudioDS());
f.setStrokeStyle(new SolidPenStyle(ColorUtil.Grey, true, lineThickness, null));
audioStreamSciChart.getRenderableSeries().add(f);
scichartLayout = mAudiostream.getChildAt(0);
}
I understand that, currently it’s drawn from left to right because i append data on my audioDS, is it possible to make it draw from right to left instead ?
Best regards,
Wavely
- damien gaillard asked 5 years ago
- last active 5 years ago
Has anyone ever encountered this problem?
Could you give me a help? How to solve this problem?
The app didn’t run in the method of ‘getStrokeColors()’, when I debugged.
public class BubbleChartFragment extends ExampleBaseFragment {
...
{
...
FastBubbleRenderableSeries mRSeries = sciChartBuilder.newBubbleSeries()
.withDataSeries(dataSeries)
.withZScaleFactor(zScaleFactor / 10f)
.withBubbleBrushStyle(new SolidBrushStyle(0xffff0000))
.withAutoZRange(false)
.withStrokeStyle(0xff00ff00, 20f)
.withPaletteProvider(new StrokePaletteProvider())
.build();
}
private class StrokePaletteProvider extends PaletteProviderBase<FastBubbleRenderableSeries> implements IStrokePaletteProvider {
private final IntegerValues colors = new IntegerValues();
private final int[] desiredColors = new int[]{0xFF00FF00, 0xFF0000FF};
protected StrokePaletteProvider() {
super(FastBubbleRenderableSeries.class);
}
@Override
public void update() {
final BubbleRenderPassData currentRenderPassData = (BubbleRenderPassData) renderableSeries.getCurrentRenderPassData();
final int size = currentRenderPassData.pointsCount();
colors.setSize(size);
final int[] colorsArray = colors.getItemsArray();
final int[] indices = currentRenderPassData.indices.getItemsArray();
for (int i = 0; i < size; i++) {
final int index = indices[i];
colorsArray[i] = desiredColors[index % 2];
}
}
@Override
public IntegerValues getStrokeColors() {
return colors;
}
}
}
- SiYuan Ou asked 5 years ago
- last active 5 years ago
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.
- Willi SchĂ¼ler asked 3 years ago
- last active 3 years ago
Hi,
I’m using scichart for android and trying to change the color of the column that was hit by touch. I have successfully identified which index of the data series that was hit. I’ve looked all over the android documentation but does not find an answer or example for this. This is my onTouch function:
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
SciChartSurface surface = (SciChartSurface) view;
touchPoint.set(motionEvent.getX(), motionEvent.getY());
surface.translatePoint(touchPoint, surface.getRenderableSeriesArea());
for (IRenderableSeries renderableSeries : surface.getRenderableSeries()) {
renderableSeries.hitTest(hitTestInfo, touchPoint.x, touchPoint.y, 30);
if (hitTestInfo.isHit) {
Double yValue = consumptionDataSeries.getYValues().get(hitTestInfo.dataSeriesIndex);
// Todo: Show a text annotation and color the column differently
Toast.makeText(this.getContext(), yValue.toString(), Toast.LENGTH_SHORT).show();
}
}
return true;
}
What should I do next?
- Linnea Springare asked 1 year ago
- last active 1 year ago
I created demo project using SurfaceMeshRenderableSeries3D but there is bugs or glitch. I have click listener.
image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (value == 0) {
layout.setVisibility(View.GONE);
value = 1;
} else {
value = 0;
layout.setVisibility(View.VISIBLE);
}
}
});
Above is basic GONE and VISIBLE logic, when i click image first time layout view is gone and SciChartSurface3D get full screen below is xml code.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/image"
android:src="@mipmap/ic_launcher_round"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:background="@color/design_default_color_secondary_variant"
android:visibility="visible"
android:orientation="vertical"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="100dp"/>
<com.scichart.charting3d.visuals.SciChartSurface3D
android:id="@+id/chart3d"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
My issues is when i click image the Scichart is getting full but with some black screen glitch, I attach before and after click event images.
Thanks in advance i am waiting for your answer.
- Tushar Sawant asked 2 years ago
- last active 2 years ago
For cursor labels, if the text of the cursor label is longer than the label text, it is falling outside the axis area. I want it to stay inside the axis as shown in the image, is there any way to do this?
- Jeong HaMin asked 5 months ago
Sometimes the X axis does not display the coordinOne of the pictures in the appendix is normal and one shows incorrect.ates when the chart is moved.
How to solve?
- Huang haiyan asked 6 years ago
- last active 6 years ago
Hi,
i have some candles and i want to force the chart for removing candles with
open = Double.NaN
high = Double.NaN
low = Double.NaN
close = Double.NaN
openTime – special day (timestamp)
What I see:
- Vahid Garousi asked 1 year ago
- last active 4 months ago
When displaying data in the chart, the data will not start at the beginning/left of the chart, but there is a margin.
How can I set this margin to 0 so the data will be displayed directly after the left yAxis.
The same margin is also at the right of the chart. I also would like a much smaller margin there.
Thanks….
- EJansen asked 8 years ago
- last active 8 years ago
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?
- Huang haiyan asked 6 years ago
- last active 6 years ago
Hi I am implementing a chart on Android with 24 Hours of data viewable in 1, 2, 4, 8, 12 and 24 hours windows. The chart is drag-able upon the xAxis only. The full extent of the yAxis is always visible.
I am struggling to control the rate of scroll compared to the drag speed. What is desired is always a perceived one to one ratio of movement. This means that a data point’s movement distance when scrolled is the same is the point of touch’s movement distance regardless of zoom level.
I am currently using:
ChartModifierCollection surfaceChartModifiers = surface.getChartModifiers();
XAxisDragModifier dragModifier = new XAxisDragModifier();
dragModifier.setDragMode(AxisDragModifierBase.AxisDragMode.Pan);
dragModifier.setClipModeX(ClipMode.ClipAtExtents);
surfaceChartModifiers.add(dragModifier);
ZoomPanModifier zoomPanModifier = new ZoomPanModifier();
zoomPanModifier.setClipModeX(ClipMode.ClipAtExtents);
zoomPanModifier.setDirection(Direction2D.XDirection);
zoomPanModifier.setZoomExtentsY(false);
surfaceChartModifiers.add(zoomPanModifier);
Currently however the ratio does not appear to be one to one the scrolling move further than the touch drag distance.
How can I achieve this?
- Simon Barnes asked 6 years ago
- last active 6 years ago
If you set limit on range of axis, the pinch gesture will not work correctly.
Pinch the chart and hold for a while (about less than 1 sec), the chart will resize to the limit value you set on the axis.
You can change code of OscilloscopeFragment.java#106 in Examples to below to reproduce this problem.
final IAxis xBottomAxis = sciChartBuilder.newNumericAxis()
.withAutoRangeMode(AutoRange.Never)
.withAxisTitle("Time (ms)")
.withVisibleRange(new DoubleRange(2.5, 4.5))
.withVisibleRangeLimit(0,20) // this will help reproduce the problem
.build();
- zhengyang qu asked 5 years ago
- last active 5 years ago
Hi.
We want to use your Android Chart library in our project. I’m getting familiar with it and I don’t totally gets how to implement Scrolling Realtime (FIFO) Line Chart.
What we want to do: our copmany wants an app that will represent the data on the line charts from their sensors. I need real-time (FIFO) representation from 1 to 16 charts in RecyclerView.
The guide here doesn’t cover the whole implementation (for example, we add data to XyDataSeries, but where to add these series to surface is not indicated). And link to github is not working also.
Do you have some example code or documentation regarding it?
- Yevgenij Homyak asked 2 years ago
- last active 2 years ago
Dear Support, I have SciChartSurface in fragment (Xamarin Android). I added Xaxis (DateAxis), Yaxis (NumericAxis), standard modifiers and few XyDataSeries as FastLineRenderableSeries. Everything is working fine (screenshot 1). But something strange is happen when fragment with chart is Paused -> Stopped and then Started -> Resumed. Xaxis and Yaxis are not visible. All dataseries are not visible. But I debugged and all data is there. Even rolloverModifier is still working and correct data values are displayed in labels (screenshot 2). It does not happen every time – it depends on what external intent stopped fragment.
I’ve tried reinitialize chart (clear Xaxis, Yaxis, remove modifiers, remove renderableSeries are reinit all with new variables) and it does not help. Only fragment dettach -> attach helps or screen orientantion change (it reinitializes fragment)
Could you tell me any suggestion what can I check or how to force to redraw whole SciChartSurface? (hiding it and showing it does not help – effect is the same. Only fragment dettach and attach helps (this is my workaround at the moment).
- Artur Kowalczuk asked 5 years ago
- last active 5 years ago
Hello.
I am working on Xamarin Android project with C#. Since having a legend within the chart causes problems with too many axis’ (no scrolling is available thus selecting different series in a legend becomes unavailable) and having a legend outside of chart area, anywhere we desire, would be of a preference, is there a tutorial on how could I achieve such a thing? Our project needs this functionality for both Android and iOS.
Would be grateful if anyone could help out with this issue.
Thank you in advance!
- pauzu asked 5 years ago
- last active 5 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
I want to reference javadocs for the library in Android Studio. According to the tutorial, “You can find javadoc files in \Libs\Docs folder:”. But I haven’t installed anything, just added the libraries using Maven. I searched for Docs folder, but could not find it.
Where are javadocs located or where do we download them?
- Primoz asked 5 years ago
Hi,
I’ve only really just got started with Scichart.
I’ve created a realtime ticking chart using candlesticks.
Its based on the examples.
The problem I have is that if I add 200 points to the graph, the graph is zoomed out so that all 200 points are on screen and visible.
I want to zoom in a bit and position the visible area to the latest points. To the front (right). The user can then scroll left to see previous points.
I’ve tried a couple things like…
IRange visibleRange = surface.getXAxes().get(0).getVisibleRange();
visibleRange.setMax(20.09);
IRange foo = surface.getXAxes().get(0).getMaximumRange();
visibleRange.setMinMaxDouble(foo.getMaxAsDouble(), foo.getMaxAsDouble());
The set max works, but I cant figure out how to position the view to the latest points (the very right)
Can someone help?
Thanks
Aidan
- Aidan Mack asked 8 years ago
- last active 8 years ago
We are testing your Android Example application, andwe are trying to find out the capabilities of the 2d Heatmap chart.
I have found in your documentation that you have the “Heatmap Texture Filtering” feature, anyways I am not able to set it as true in the heatmap plot. (found on the [WPF Heatmap Chart documentation][1 )
Is this feature disabled in Android Charts?
I am trying to enable this filtering, but the modification on your example app does not compile.
I have already tried to modify other stuff on your heatmap example chart, and it works, but particularly in our application we need as a must this kind of feature. It will be finally something that helps us to decide if your SciChart library meet our requirement.
Thanks for your attention,
- Eduardo Robles asked 2 years ago
- last active 2 years ago
Hi,
I am using Scichart android ,for Linking Chart Modifiers of Multiple charts I use these lines of code as shown below but it will not synchronize charts on X axis properley sometimes what is the reason ?
Is there is any other method to do that?
ModifierGroup chartModifiers2 = sciChartBuilder.newModifierGroup()
// Setting MotionEventsGroup
.withMotionEventsGroup(“SharedMotionEvents”).withReceiveHandledEvents(true)
.withLegendModifier().withShowCheckBoxes(true).withReceiveHandledEvents(true).build()
.withZoomPanModifier().withClipModeX(ClipMode.ClipAtExtents).withReceiveHandledEvents(true).build()
.withPinchZoomModifier().withReceiveHandledEvents(true).build()
.withZoomExtentsModifier().withReceiveHandledEvents(true).build()
.withRolloverModifier().withReceiveHandledEvents(true).build()
.build();
- sci chart asked 5 years ago
- last active 4 years ago
When we move the cursor fast in Sci Chart surface, Sometimes its making customized tooltip (cursor Modifier) to freeze. We are not having this issue in landscape mode. we have this issue only when we use it in half of fragment.
View hierarchy:
swipe refresh>
nested Scrollview>
constraint layout>
view> –50% of screen
Sci Graphview> –50% of screen
/ constraint layout>
/nested Scrollview>
/swipe refresh>
- Krish J asked 10 months ago
When i go to zoom on my YAxis while a YAxis VisibleRangeLimit is baing set, the zoom does not work correctly. Once the zooming is finished it will reset back to the range limit. If i remove the range limit, the zooming then works as expected.
- Clifford Bateman asked 6 years ago
The two pictures are part of the same column, but the time is different.
How to solve it?
- Huang haiyan asked 6 years ago
As of now ,when i tried to build line chart using realtime data ,by default i m getting square wave form but i want like linear gradient close to look like ventilator graph.
if any one have implemented that before then please help as i m new to this library.
- Vipul Chaurasia asked 4 years ago
On Xamarin iOS there is a property SciChartSurface.ChartTitle.
Is there an equivalent on Xamarin Android?
- Nicholas Provost asked 6 years ago
- last active 6 years ago
Can you help me please!
I was searching forum and see all different questions with dfferent ansvers but no one help for me.
I’m using CategoryDateAxis and whant to show to users vertical lines between days, weeks or month
Its depends from timestamp and visible period.
I need to opportunity to provide themself when to display vertical line.
In chart I display CandlestickSeries from stosk market and users whant to know when one day is ended and new day is begin.
How can I do that?
- Evgeny Khramov asked 6 years ago
- last active 6 years ago
Hi,
When I did some practices with your example app, I found some features does not work as I expected.
Here is CandlestickChartFragment.java and I wrote additional lines on xAxis builder, yAxis builder and surface.chartModifiers,
public class CandlestickChartFragment extends ExampleBaseFragment {
@BindView(R.id.chart)
SciChartSurface surface;
@Override
protected int getLayoutId() {
return R.layout.example_single_chart_fragment;
}
@Override
protected void initExample() {
PriceSeries priceSeries = DataManager.getInstance().getPriceDataIndu(getActivity());
int size = priceSeries.size();
final IAxis xAxis = sciChartBuilder.newCategoryDateAxis()
.withVisibleRange(size - 30, size)
.withGrowBy(0, 0.1)
// Start additional lines
.withAutoFitMarginalLabels(false)
.withTextFormatting("yyyy-MM-dd")
.withCursorTextFormating("MM-dd")
// End additional lines
.build();
final IAxis yAxis = sciChartBuilder.newNumericAxis()
// Start additional lines
.withAutoFitMarginalLabels(false)
.withTextFormatting("$ #.#")
.withCursorTextFormating("#.#")
// End additional lines
.withGrowBy(0d, 0.1d)
.withAutoRangeMode(AutoRange.Always)
.build();
IOhlcDataSeries<Date, Double> dataSeries = new OhlcDataSeries<>(Date.class, Double.class);
dataSeries.append(priceSeries.getDateData(), priceSeries.getOpenData(), priceSeries.getHighData(), priceSeries.getLowData(), priceSeries.getCloseData());
final FastCandlestickRenderableSeries rSeries = sciChartBuilder.newCandlestickSeries()
.withStrokeUp(0xFF00AA00)
.withFillUpColor(0x8800AA00)
.withStrokeDown(0xFFFF0000)
.withFillDownColor(0x88FF0000)
.withDataSeries(dataSeries)
.build();
UpdateSuspender.using(surface, new Runnable() {
@Override
public void run() {
Collections.addAll(surface.getXAxes(), xAxis);
Collections.addAll(surface.getYAxes(), yAxis);
Collections.addAll(surface.getRenderableSeries(), rSeries);
Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers()
// Start additional lines
.withCursorModifier().withShowAxisLabels(true).withShowTooltip(true).build()
// End additional lines
.build());
sciChartBuilder.newAnimator(rSeries).withWaveTransformation().withInterpolator(new DecelerateInterpolator()).withDuration(3000).withStartDelay(350).start();
}
});
}
}
The result is below picture. I also attached the same image.
https://imgur.com/a/5Eqo8Gd
Displayed xAxis values are [27 Sep, 04 Oct, 11 Oct, 18 Oct, 25 Oct, 01 Nov].
The problems are
1. xAxis(CategoryDate) tick values should be started with year, even though it does not have enough margin. It looks updated format is not applied.
2. Cursor should be shown on touch event, but it does not be displayed at all.
I ran above code on [Samsung Galaxy S9, API 26] and [Xiaomi Mi A1, API 25] and same problems are happened.
Could I know what I missed?
- Changhee Lee asked 5 years ago
- last active 5 years ago
Turn off the phone permission, the chart shows the error, why, can you solve it?
Only when this permission is opened does it appear normal
- Huang haiyan asked 5 years ago
Hello
I have animated line renderable series – when new point added, whole x-axes moves to the right a little.
Everything is smooth until pinch zoom appears.
I think it’s conflict with animated viewport move and zooming.
Is there a way to know, when zooming appears?
E.g. if i know, when zoom started and finished – i can solve this.
Thanks
- Kirey Vadim asked 5 years ago
- last active 5 years ago