Pre loader

Forums

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
0 answers
9k views

Hello,

I’m currently evaluating SciChart to see if it supports our needs for an application. We’re trying to have a chart that closely mimics the iOS Stock application (attachment: StockApp.PNG) but for sensor values. Our effort so far can be seen in attachment: SciChart.jpg.

  1. Inside the tooltip provided by the RolloverModifier, we only want to display the value of the Y axis – and get rid of the X axis (datetime). Is there a way to hide the X axis value and only display the Y axis value inside the tooltip? Refer to SciChart.jpg. For example, when RolloverModifier is visible, the tooltip for Turbidity line should only read “Turbidity: 2.50 NTU”, where 2.50 is the Y-axis value and NTU is the unit of measure. Notice we do not want to see “X: 28/01/18 12:24PM” at all in the tooltip.

  2. Similar to the iOS Stock app, we require a second RolloverModifier when a second finger rests on the chart. The idea is to provide a quick popover to display the difference in Y-axis value between the two RolloverModifier values. I tried adding a second instance of RolloverModifier to the SCIChartSurface however the vertical trace line would just overlap the first finger’s trace line.

There are the two major requirements I see right now in determining whether to invest in SciChart. So please let me know if they are possible. Below is the code.

    override func viewDidLoad() {
        super.viewDidLoad()

        layout()

        configXaxis(surface: sciChartSurface)
        configYaxis(surface: sciChartSurface)        
        loadDataSeriesFromCsv(csv: rlCSVToDownload!)
    }

   private func layout() {
        let margins = view.layoutMarginsGuide

        sciChartSurface = SCIChartSurface()
        sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(sciChartSurface!)

        sciChartSurface?.leadingAnchor.constraint(equalTo: self.view.leadingAnchor).isActive = true
        sciChartSurface?.trailingAnchor.constraint(equalTo: self.view.trailingAnchor).isActive = true
        sciChartSurface?.bottomAnchor.constraint(equalTo: margins.bottomAnchor).isActive = true
        sciChartSurface?.topAnchor.constraint(equalTo: margins.topAnchor).isActive = true
    }

    private func configYaxis(surface: SCIChartSurface!) {
        let axis = SCINumericAxis(), numericFormat = "%.02f"
        axis.textFormatting = numericFormat
        axis.cursorTextFormatting = numericFormat
        surface.yAxes.add(axis)
    }

    private func configXaxis(surface: SCIChartSurface!) {
        let axis = SCIDateTimeAxis(), datetimeFormat = "dd/MM/YY H:mm a", subDayFormat = "H:mm a"
        axis.textFormatting = datetimeFormat
        axis.subDayTextFormatting = subDayFormat
        axis.cursorTextFormatting = datetimeFormat

        surface.xAxes.add(axis)
    }

    private func addModifiers() {
        let xAxisDragmodifier = SCIXAxisDragModifier()
        xAxisDragmodifier.dragMode = .pan
        xAxisDragmodifier.clipModeX = .none

        let yAxisDragmodifier = SCIYAxisDragModifier()
        yAxisDragmodifier.dragMode = .pan

        let extendZoomModifier = SCIZoomExtentsModifier()
        let pinchZoomModifier = SCIPinchZoomModifier()

        let rolloverModifier = SCIRolloverModifier()

        let legend = SCILegendModifier()

        let groupModifier = SCIChartModifierCollection(childModifiers: [xAxisDragmodifier, yAxisDragmodifier, pinchZoomModifier, extendZoomModifier, legend, rolloverModifier])

        sciChartSurface?.chartModifiers = groupModifier
    }

   private func loadDataSeriesFromCsv(csv: CSV) {
        rlCSVConnection?.download(csv: csv, onProgress: nil, onComplete: {
            [weak self] (csv) -> (Void) in

            self?.turbDataSeries = SCIXyDataSeries(xType: SCIDataType.dateTime, yType: SCIDataType.double)
            self?.turbDataSeries.seriesName = "Turbidity"

            self?.cl2DataSeries = SCIXyDataSeries(xType: SCIDataType.dateTime, yType: SCIDataType.double)
            self?.cl2DataSeries.seriesName = "Chlorine"

            //... Populate data into DataSeries ...

            self?.turbRenderableSeries = SCIFastLineRenderableSeries()
            self?.turbRenderableSeries.isDigitalLine = true
            self?.turbRenderableSeries.dataSeries = self?.turbDataSeries
            self?.turbRenderableSeries.style.strokeStyle = SCISolidPenStyle(color: UIColor.orange, withThickness: 1)

            self?.cl2RenderableSeries = SCIFastLineRenderableSeries()
            self?.cl2RenderableSeries.isDigitalLine = true
            self?.cl2RenderableSeries.dataSeries = self?.cl2DataSeries
            self?.cl2RenderableSeries.style.strokeStyle = SCISolidPenStyle(color: UIColor.green, withThickness: 1)

            self?.sciChartSurface?.renderableSeries.add(self?.turbRenderableSeries)
            self?.sciChartSurface?.renderableSeries.add(self?.cl2RenderableSeries)

            self?.addModifiers()
        }, onFailure: nil)
    }

Thanks.

1 vote
7k views

Hi,

I’m attempting to plot on a mountain graph with a DateTimeAxis for the x-axis and I noticed that the plotted time is inaccurate.

The data that am attempting to put in has the following NSDate value: 2017-01-06T10:09:25+0000
Correct me if am wrong, but I believe the time on the axis that ought to be displayed should follow the device’s system timezone? In my case, it is +0800, setting the time to be about 6:09:25 pm

However, the plotted time ends up showing the point to be plotted at 2:09:25 instead.

I’ve tested with a date formatter and it displays the time as it should (6:09:25 pm).
I don’t think I configured anything regarding the axis’s time format, and the insertion of data was done as below:

[self.mountainSeries appendX:SCIGeneric(m.timestamp) Y:SCIGeneric(m.mid)];
[self.chartSurface invalidateElement];

Also, to add on, if I were to extract the XMax value from the axis (in this case, is the timestamp as above), it returns me as such: 2017-01-06 18:09:25 +0000

Thank you.

0 votes
0 answers
3k views

When I ran the sample “iOS & macOS Audio, Radio frequency and Spectrum Analyzer” of “SciChart.iOS.Examples-SciChart_v4_Release”,
HeatMap graphs are not displayed on 5th generation iPads.

For iPads of generations higher than the 5th generation, the HeatMap graph is displayed.
Does SchiCharts_v4 not support 5th generation iPads?

The environment is as follows.
IOS 15.2

0 votes
4k views

Hi,

I wanted to try the V3 beta for iOS in objective-c but I don’t know how to format the string with the new license key.

Neither this (as found here: https://www.scichart.com/beta-edition-of-scichart-mobile-sdk-v3-now-available/):

[SCIChartSurface setRuntimeLicenseKey:@""
 "{"
   "\"ActivatedBy\": null,"
   "\"Customer\": \"Anyone\","
   "\"DeveloperCount\": null,"
   "\"ExpiryDate\": \"2019-12-21\","
   "\"Features\": ["
     "\"WPF-2D\","
     "\"AND-2D\","
     "\"iOS-2D\","
     "\"WPF-3D\","
     "\"AND-3D\","
     "\"iOS-3D\""
   "],"
   "\"IsTrialLicense\": true,"
   "\"KeyCode\":" "gRPFuMCiB0otJzffhGFJO09BtH3drfoDZV5pAkQNv9hyHJsfBsCr42BHRJ/oz2ib2uEgT33IYW3fGKExB4KPUbrNOeKazYrMI8pD5OJVlDoRXuJdY97iUZU2jNHRnXN0cgpBdqcQTWgW/afd9pYwcYT5P22sklCSrtTdwcuyepiLE9Ap9B2ixMVpoB43Yj79g1/yKzgPQaAmW38hjDyByQwxCQ9R88Jt4JqQRVQUhYxj31CFoX7Upm36oP32WGbEEex4E1qHTY+KALouRnA9JQZej13V4MjwF45xuQNiUDbk3RHtyJwWEjwGS9jHh24WiTj1aOaw8PAfBmKZl2FKfKSL7Q7Nu9jtUgZdGUbpZTKYrASpoVQiVk2/+1xAA8dB/7RdsjXVVrXf1RnMg8dNXsY7gcJJ25SF4QmZwqa82Dl+PnXGq0BSvfLaSrSl8uWkimTt0D/FwvaVqvpzomORpStboVNroTAcbaBJRIOK6tZDFwBj3qQV1N470/XW3aKHckN7GrNOpS7xpZ/EM9k=,"
   "\"MachineId\": null,"
   "\"OrderId\": \"BETA trial key\","
   "\"ProductCode\": \"SC-BUNDLE-SDK-PRO\","
   "\"SerialKey\": null,"
   "\"TicketQuantity\": null"
 "}"
 ""];

or this (old format style):

  [SCIChartSurface setRuntimeLicenseKey:@""
   "<LicenseContract>"
   "<Customer>Anyone</Customer>"
   "<OrderId>BETA trial key</OrderId>"
   "<LicenseCount>1</LicenseCount>"
   "<IsTrialLicense>true</IsTrialLicense>"
   "<SupportExpires>2019-12-21</SupportExpires>"
   "<ProductCode>SC-BUNDLE-SDK-PRO</ProductCode>"
 "<DeveloperCount>null</DeveloperCount>"
 "<MachineID>null</MachineID>"
 "<SerialKey>null</SerialKey>"
"TicketQuantity>null</TicketQuantity>"
"<Features>[WPF-2D, AND-2D, iOS-2D, WPF-3D, AND-3D, iOS-3D]</Features>" "<KeyCode>gRPFuMCiB0otJzffhGFJO09BtH3drfoDZV5pAkQNv9hyHJsfBsCr42BHRJ/oz2ib2uEgT33IYW3fGKExB4KPUbrNOeKazYrMI8pD5OJVlDoRXuJdY97iUZU2jNHRnXN0cgpBdqcQTWgW/afd9pYwcYT5P22sklCSrtTdwcuyepiLE9Ap9B2ixMVpoB43Yj79g1/yKzgPQaAmW38hjDyByQwxCQ9R88Jt4JqQRVQUhYxj31CFoX7Upm36oP32WGbEEex4E1qHTY+KALouRnA9JQZej13V4MjwF45xuQNiUDbk3RHtyJwWEjwGS9jHh24WiTj1aOaw8PAfBmKZl2FKfKSL7Q7Nu9jtUgZdGUbpZTKYrASpoVQiVk2/+1xAA8dB/7RdsjXVVrXf1RnMg8dNXsY7gcJJ25SF4QmZwqa82Dl+PnXGq0BSvfLaSrSl8uWkimTt0D/FwvaVqvpzomORpStboVNroTAcbaBJRIOK6tZDFwBj3qQV1N470/XW3aKHckN7GrNOpS7xpZ/EM9k=</KeyCode>"
   "</LicenseContract>"

   ];

worked.

I always get the message “Sorry! Your license token appears to be invalid. etc.”
What’s the right way?

Best regards,

Johannes

0 votes
8k views

Hello,

I am unable to install SciChart pod.
The podfile has multiple pods with multiple platforms and source.
I get the error saying ” [!] Unable to find a specification for ‘SciChart’.”
Please advice..

use_frameworks!

pod 'UICircularProgressRing'
pod 'Alamofire'

platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'

pod 'SideMenu'

source 'https://github.com/ABTSoftware/PodSpecs.git'
pod 'SciChart', :git => 'https://github.com/ABTSoftware/PodSpecs.git'
0 votes
4k views

Hi guys,

Is it possible to capture the tap event when we tap on a point marker or a data point? I can see there’s a DataPointSelectionModifier for WPF, but there’s nothing for iOS. Our goal is to show a popup (tooltip) on the point marker when the user taps on it.

Thanks,
Lazar Nikolov

1 vote
12k views

Hello!

Please take a look at the attached screenshot first.

I have a chart configured to draw real-time trading data. X axis type is DateTime. Y axis type is Float. I need to draw vertical expiration time line.

I tried to draw coordinate relative line annotation as follows:

var date: NSDate = NSDate()

let lineAnnotation = SCILineAnnotation()
lineAnnotation.xAxisId = self.axisXId
lineAnnotation.yAxisId = self.axisYId
lineAnnotation.coordMode = .SCIAnnotationCoord_RelativeX
lineAnnotation.style.linePen = SCIPenSolid(color: Style.Chart.ExpirationDateLine.Color, width: Style.Chart.ExpirationDateLine.Width
lineAnnotation.xStart = SCI_constructGenericTypeWithInfo(&date, .DateTime)
lineAnnotation.xEnd = SCI_constructGenericTypeWithInfo(&date, .DateT            

self.chartSurface.annotation = lineAnnotation
self.chartSurface.invalidateElement()

I tried to play with different coordMode values. Line does not appear. Could you help me with this task?

0 votes
4k views

I need to do some calculation for data in visible range after zoom. Is there any notification when gesture ends in SCIPinchZoomModifier? If not, then that means I have to build a custom zoom gesture modifier? If so could you show me how pinch zoom is done in SCIPinchZoomModifier so that I don’t need to build everything from scratch? Thanks

  • Haoran Xie asked 5 years ago
  • last active 4 years ago
0 votes
0 answers
7k views

Hi,

i want to disable the pan effect when user long press on chart and allow the user to scroll only in the currently visible range to view the rollover tooltip so that user can see the reading in the current visible range. Once the long press is release, then enable the pan effect again.

Currently when user try to see the reading using rollover tooltip, the whole chart is moving. I have tried removing and adding the zoompanmodifier on long press gesture in ios. But it is not working.

Thank you in advance.

0 votes
9k views

Hi, guys

Please take look at:
http://prntscr.com/gmmib5

So my question is

Is there a way to highlight a line of a gridlines to which the label belong? It can be a color changed or something similar that can be easily perceived by the user.

Best regards,
Sushynski Andrei

0 votes
3k views

Hi everyone!

I have a candlestick chart that uses SCIZoomPanModifier() so i can zoom and pan in the chart. I added a SCITooltipModifier() so i can inspect the individual data points. I noticed that by adding the toolTipModifier, that my pan and zoom stops working. I can’t figure out why. Would really appreciate if someone could tell me why or if i am missing some variable i need to set

0 votes
3k views

Please tell me how to add the ability to use multiple touch. The goal is that when the user touches the screen in two places at the same time, two lines appear on the graph. I would like to understand whether this is possible?

0 votes
9k views

Hi, guys

it seems that i had found a mistake:

At SCICursorModifierStyle class if i try to set up axisVerticalTooltipCornerRadius property it lead to changing of axisHorizontalTooltipCornerRadius

Please take a look

Best regards,
Sushynski Andrei

1 vote
5k views

We have created graph for x axis string and y axis double. we have create object like this XyDataSeries<string,double> if run app getting exception error .

How to declare and how to use it .

0 votes
4k views

Hello, I’ve been trying to create a SCIUniformHeatMap, but I only get a blank, black screen.
Can anyone recommend why colors and the graph aren’t showing up? Thanks

var ecmSurface: SCIChartSurface = SCIChartSurface()
var ecmDataSeries = SCIUniformHeatmapDataSeries(xType: .double, yType: .double, zType: .double, xSize: ReviewModeData.MATRIX_COLUMNS, ySize:ReviewModeData.MATRIX_ROWS)
var heatmapRenderableSeries: SCIFastUniformHeatmapRenderableSeries = SCIFastUniformHeatmapRenderableSeries()
private let countColors = 6
private var colorRGBArray: [UIColor] = [
UIColor(red: 0.0/255.0, green: 0.0/255.0, blue: 131.0/255.0, alpha: 1),
UIColor(red: 0.0/255.0, green: 0.0/255.0, blue: 255.0/255.0, alpha: 1),
UIColor(red: 0.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1),
UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 0.0/255.0, alpha: 1),
UIColor(red: 255.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: 1),
UIColor(red: 128.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: 1)
]
for i in 0..<ReviewModeData.MATRIX_COLUMNS {
for j in 0 ..< ReviewModeData.MATRIX_ROWS {
ecmDataSeries.update(z: ecm2DMatrix[i][j], atX: i, y: j)
}
}
var colorZValueArray: [Double] = determineColorMapValues(clim1: 0, clim2: 1);
var colorMap = SCIColorMap(colors: colorRGBArray, andStops: colorZValueArray as [NSNumber])

//configure ECM heatmap
heatmapRenderableSeries.minimum = ReviewModeData.ECM_CLIM1
heatmapRenderableSeries.maximum = ReviewModeData.ECM_CLIM2
heatmapRenderableSeries.dataSeries = ecmDataSeries
heatmapRenderableSeries.colorMap = colorMap!

0 votes
6k views

Hello,
I would like to place a title for an X axis to the right of axis labels. I am easily able to achieve this on Android (see attached screenshot), but I cannot find relevant properties (axisTitlePlacement etc.) in iOS version of SciChart.

In the last section of this article in documentation you write that it is possible, however the links are dead (and frankly, the method names look suspiciously Java-ish to me).

0 votes
8k views

I’m trying to add annotations on a chart but they are rendering above my legend.

Initially (similar to most of the demo code I’ve seen), I setup my modifiers, then created my series and animated them in — then added my annotations (adding to annotationGroup). This created a timeline of blank chart surface with legend (good so far), annotations popping in before the chart series animated in (weird / not good) and on TOP of the legend (really bad), then the animation of the series after that.

I’ve tried about everything I can think of and the best I’ve been able to do is use a completion block of the animation rendering the series — and moved my chart modifiers (and legend) into that completion block. If I put the annotations in the completion block, they will render after the chart modifier and I have the same problem (even if placed after the chart modifiers). I have to set the annotations before the animation, and then the chart modifier in the completion block will work and the legend will be above the . Of course, this is a bit odd too — as first my annotations pop up by themselves on the blank surface, followed by my series animating in, then at the end of the 2 second animation, the legend just pops in.

I really would like my legend to be rendered first on the blank surface and the annotations and chart series to animate in together under my legend. I’m gathering that’s unlikely (at least the animation part) — but is there anyway I can place my legend first and still have the annotations go under it? It feels like the layers should be: modifiers > annotations > rendered series. I also I’ve read this order before in some WPF docs I believe, but doesn’t seem to be respected on iOS?

UPDATE: My current work around isn’t sufficient because I really need access to the renderable series to create the annotations which means I really can’t defer my chart modifiers (i.e. legend) until after the annotations. Additionally, if I need to update (remove / re-add) an annotation due to a series being deactivated in the legend, now my annotations are on top of the legend again.

0 votes
7k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • Igor Peric asked 7 years ago
  • last active 1 week ago
1 vote
6k views

I want to style one of the data point bars in a column chart to be a different color. Is there any way to do this?

  • doughill asked 8 years ago
  • last active 8 years ago
1 vote
7k views

Originally my chart would
– create the surface
– setup the chart modifiers
– setup the axis
– add the data (SCIFastLineRenderableSeries).

However, it appears that when you .add(new SCIFastLineRenderableSeries) it recreates all the tooltips on each add, and finally on the very last SCIFastLineRenderableSeries that is inserted will get two duplicate tooltips. This happens both with the default tooltips or custom tooltips.

I finally noticed that some of your examples you setup the modifiers at the end after adding the data. So I moved all the chart modifiers into a separate function and called it after the data is setup, and now the proper number of tooltips appears.

This might either need to be noted somewhere prominent in the iOS docs; or even better the order shouldn’t matter.

0 votes
5k views

Hi, guys

Is it possible to use negative index for methods:

-(void) insertAt:(int)index X:(SCIGenericType)x Open:(SCIGenericType)open High:(SCIGenericType)high Low:(SCIGenericType)low Close:(SCIGenericType)close;

-(void) updateAt:(int)index Open:(SCIGenericType)open High:(SCIGenericType)high Low:(SCIGenericType)low Close:(SCIGenericType)close;

Can you give an answer?

Best regards,
Sushynski Andrei

0 votes
3k views

Hello,

We need to add a label with the value of the yAxis on top of all Point Markers. There is an example on WPF, but found nothing on iOS.

How can we achieve that?

2 votes
8k views

I’m trying to create a spectrum viewer with your library. One important feature is a cursor supporting both automatic mode and manual mode. In automatic mode, it stays at the maximum value. In manual mode, it moves with finger panning. It’s close to the SCICursorModifier with the cross lines, but it should always stay on the plot even without touch. Also it should reside on real data points instead of anywhere in between like the SCIRolloverModifier instead of the SCICursorModifier.

Could you give me some advices about how to achieve it? Thanks.

EDIT: after reading more of your documents, I believe HorizontalLineAnnotation and VerticalLineAnnotation are the way to go. I have already added them as the automatic mode cursor. For the manual mode, I still need your help to achieve either:
1) a callback function for the VerticalLineAnnotation drag event, so that I could move both lines to the corresponding data point
or
2) a custom ZoomPanModifier to allow me to distinguish one point or two points touch: one point panning to move the whole plot and two points panning to determine the new cursor location and redraw the two annotations there

EDIT2: I was able to create a custom VerticalLineAnnotation class to handle the panning event. There is one more question left. Right now in order to update the verticallineannotation and horizontallineannotation on the graph, I remove them from sciChartSurface.annotations, change x/y locations and add them back. Is there a redraw or refresh or update function to call directly?

Thanks

  • Haoran Xie asked 5 years ago
  • last active 5 years ago
0 votes
0 answers
8k views

I’ve been pouring through the documentation and examples and cannot find an example of this. Has anyone been able to accomplish this and willing to share an example? Thanks.

0 votes
6k views

I’ve downloaded yesterday showcase example from your github: https://github.com/ABTSoftware/SciChart.iOS.Examples

After providing license key other samples work ok except Audio Analyzer (and the last sales dashboard – shows blank screen).

Problems is somewhere with SpectrogramSurfaceController ( If I commend it out wave plot and fft plot works)

Xcode shows there is some bad memory access at:
[SCIFastUniformHeatMapRenderableSeries internalDrawWithContext:WithData:]
cblas_sscal

Tested using:
iPhone 5SE
iOS 11.2.5
Xcode 9.2

0 votes
6k views

Hi!
I am going through the showcase example for the spectrogram and I had a confusion on the sizeX and Y parameter of SCIUniformHeatmapDataSeries. Are these sizes as per the width and height of the surfaceChart ? I am going to plot an array of data. How do I determine the correct sizes for X and Y.
Moreover, is it necessary that the size array used for updating the dataSeries has to be (xSize*ySize)?

0 votes
14k views

Hi guys,

I am having difficulties setting the background of my bar chart with SCICategoryDateTime X axis since I switched to 2.0.

As far as I understand, just setting the background property of the SCIChartSurface should suffice.
These are all of the things I’ve tried:

1. [self.barSurface setBackgroundColor:[UIColor clearColor]];
2. [self.barSurfaceView setBackgroundColor:[UIColor clearColor]]; 
3. self.barSurface.renderableSeriesAreaFill = [[SCISolidBrushStyle alloc] initWithColor:[UIColor clearColor]];
4. [self.barSurface.renderSurface setIsTransparent:YES];

I didn’t find any other way of setting it, but it still remains black. Any thought on what might cause it?

EDIT: I just found out about this color setting:

[axisStyle setGridBandBrush:[[SCISolidBrushStyle alloc] initWithColor:[UIColor whiteColor]]];

The result I got was a black and white chess board, as shown on the attached picture. I really don’t understand this behaviour. If I set this gridBandBrush to nil, columns are coloured with random colours, so the chart looks like a rainbow. I understand why is this happening but shouldn’t there be a default colour in case brush is nil?

EDIT 2: While debugging using “Capture view hierarchy” in XCode I discovered that render surface is actually white inside debugger. Perhaps it will give more insight to you, it doesn’t mean much to me – I guess it’s because rendering is done on GPU and the context is not available to the debugger.

Best,
Igor

  • Igor Peric asked 7 years ago
  • last active 6 years ago
0 votes
10k views

Hey Guys,

I have a requirement where I need to show Donut Chart Title , but adding any annotation is crashing my application.

    let textAnnotation = SCITextAnnotation()
    textAnnotation.coordinateMode = .relative
    textAnnotation.x1 = SCIGeneric(0.5)
    textAnnotation.y1 = SCIGeneric(0.5)
    textAnnotation.horizontalAnchorPoint = .center
    textAnnotation.verticalAnchorPoint = .center
    textAnnotation.text = "Test"
    textAnnotation.style.textStyle.fontSize = 14
    textAnnotation.style.textColor = UIColor.fromARGBColorCode(0xff000000);
    textAnnotation.style.backgroundColor = UIColor.clear
    chartSurface.annotations = SCIAnnotationCollection(childAnnotations: [textAnnotation])

Thanks

0 votes
10k views

Hi!

I tried implementing pinch zooming for real time chart in the demo project(FIFO Performance Demo and ECG Monitor Demo) and found that it’s not possible.

I used the following code:

self.surface = [[SCIChartSurface alloc] initWithView: self.sciChartSurfaceView];
SCIPinchZoomModifier * pzm = [[SCIPinchZoomModifier alloc] init];
[pzm setModifierName:@”PinchZoom Modifier”];
self.surface.chartModifier = pzm;

If it is so, then how can I achieve it ?

  • Chui asked 7 years ago
  • last active 7 years ago
0 votes
4k views

When I add CursorModifier programmatically on long tap I have to remove my finger from screen and press it again In order to CursorModifier become visible

Is it possible to do the following?


1) scroll chart horizontally

2) long tap on screen

3) add CursorModifier programmatically and show it immediately

4) move CursorModifier(finger is still touching the screen)

5) remove finger from screen and remove CursorModifier so I can scroll again

Thank you for reply in advance!

  • Dok God asked 4 years ago
  • last active 4 years ago
0 votes
7k views

Hello,
I managed to implement a chart legend with a custom datasource (using just a SCIChartLegend object as a subview, not SCILegendModifier). However, I am unable to place the legend at specified position, it always snaps to upper-left corner of the screen. When creating a SCIChartLegend instance using the initializer that takes a Rect as a parameter, but not supplying a custom datasource, it draws correctly according to offsets specified by the supplied rect’s X and Y. It does respond to changes in the legendPosition property, but it still doesn’t allow to draw the view with any margins (which is what I’m actually trying to achieve).

1 vote
0 answers
4k views

I wan to have a view that is outside of the chart that is updated whenever the chart modifier selection is changed. Is there a way to get notified when the selection changes?

Also, is it possible to get rid of the data views. I guess I could just add a custom view to the rollover modifier that is empty?

What I want to achieve is that when the user is using the rollover modifier to view datapoint the values for that datapoint is shown above the chart. It should also be possible to drill down by clicking on this information.

0 votes
14k views

Hi,

I have an issue regarding to SCIAxisMarkerAnnotation that I could not find. Can I customise the look of it or should I implement my own axis marker? And can I add another pan gesture to annotation pin so the user can change annotation location on that axis?

Thanks,
Irmak

0 votes
0 answers
3k views

Was created react-native-charts-sci wrapper for Scichart with the structure – [Screenshot _1]. And now need to publish this package to npm private repo, but Scichart.framework folder is vast (~100 MB) and its connect in current podspec file – [Screenshot_2] like a local directory:

spec.public_header_files = “ios/SciChart.frameworks/Headers/*”
spec.vendored_frameworks = “ios/SciChart.framework”

Need to connect Scichart.framework in wrapper library like subspec that it could be taken during the installation process from vendor’s podspec repo: https://github.com/ABTSoftware/PodSpecs/tree/master/SciChart. The goal is to decrease of wrapper library folder size that would be possible to publish it to npm repo.

After adding Scichart.framework like subspec – [Screenshot_4] to podspec, get the errors after pod install – [Screenshot_3]:
– ERROR | [iOS] attributes: Can’t set version attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set authors attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set license attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set homepage attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set source attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set summary attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set documentation_url attribute for subspecs (in react-native-charts-sci/SciChart).

Can you tell me please is it possible to get Scichart.framework from vendor’s podspec repo: https://github.com/ABTSoftware/PodSpecs/tree/master/SciChart and connect it like a subspec in podspec file? Need to create LICENSE.txt with the licence and write the pass of it in podspec file? Can you provide some examples with the correct way to do it? Why get this errors? What’s wrong with the current framework connection?

0 votes
5k views

I’m trying to make a chart with a “toggle function”.

The “toggle function” what i wanted to make is this.

  1. enter to UIViewController which Chart is in it
  2. before singleTap on a chart, a chart has zoomPanModifier, XAxisDragModifier,, etc
  3. after make singleTap on the chart, that chart has only CursorModifier.
  4. CursorModifier’s UI stays on chart without disappearing and i can move crossed line to specific point i want (just like what CursorModifier originally does)
  5. another single tap on chart would make a chart to have all other modifiers but CursorModifer.

What I have made successfully was 1,2,3,5 . not 4.

The way i was going to solve this problem was make fake touch event on Chart view and
snatch UIGestureRecognizer Event and let ChartView think they’re being touched till I give stop signal

But I heard that there is no more way to pass fake touch to UIView.

So I’m feeling difficulty on this problem…..

is there any easy way to solve this problem?

TL;DR;

I WANT TO MAKE CURSORMODIFIER’ UI STAYS ON A CHART!

+)
(lldb) po SciChartVersionNumber
0x3ff0000000000000

(lldb) po SciChartVersionString
0x474f525029232840

I wanted to know what version I’m using.. but i couldn’t know… what version am i using..?

0 votes
5k views

Hello,

The problem is how to sign the X-axis (the time axis).
How can I change the date and time format on the x axis?
Is this possible when I use the SCICategoryDateTimeAxis?
We use the code from example to set the time format

0 votes
10k views

Hi, guys

My X axis is SCICategoryDateTimeAxis type.

And i have a huge amount of data to display. So i need to display it by scrolling of the chart surface.
So what is the best practice to update data series on the fly and display it at the chart surface?

Best regards,
Sushynski Andrei

0 votes
5k views

Hi all,

I’m trying to use the metal support in a little test project.
I have following lines to enable metal:

if SCIChartSurface.isMetalSupported {
      sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)
 } else {
       sciChartSurface.renderSurface = SCIOpenGLRenderSurface(frame: sciChartSurface.bounds)
 }

the surface keeps empty until I remove the

sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)

line – or in other words I use OpenGL.
Then the chart will render properly. I am using an iPhoneX (not simulator).

Thank you for your support!

Wall of Code:

import UIKit
import SciChart
import SnapKit

class ViewController: UIViewController {

    // MARK: - UIElements
    private var sciChartSurface: SCIChartSurface!

    // MARK: - Vars
    private var series: SCIXyDataSeries?

    // MARK: - Lifecycle
    override func viewDidLoad() {
        super.viewDidLoad()
        setupSurface()
        setupData()
        renderData()
    }

       // MARK: - Chart
     private func setupSurface() {
        // Create a SCIChartSurface. This is a UIView so can be added directly to the UI
        sciChartSurface = SCIChartSurface.init(frame: view.bounds)
        sciChartSurface.debugWhySciChartDoesntRender = true
        view.addSubview(sciChartSurface)

        // Detect metal with this static property
        if SCIChartSurface.isMetalSupported {
            sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)
        } else {
            sciChartSurface.renderSurface = SCIOpenGLRenderSurface(frame: sciChartSurface.bounds)
        }
        sciChartSurface.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }

        sciChartSurface.translatesAutoresizingMaskIntoConstraints = true
        sciChartSurface.backgroundColor = .gray
        // Create an XAxis and YAxis. This step is mandatory before creating series
        let xAxis = SCICategoryNumericAxis()
        setup(axis: xAxis)
        sciChartSurface.xAxes.add(xAxis)
        let yAxis = SCINumericAxis()
        setup(axis: yAxis)
        sciChartSurface.yAxes.add(yAxis)
    }

    private func setup(axis: SCIAxisBase) {
        let axisStyle = SCIAxisStyle()

        let majorPen = SCISolidPenStyle(colorCode: 0xFF393532, withThickness: 0.5)
        let minorPen = SCISolidPenStyle(colorCode: 0xFF262423, withThickness: 0.5)

        let textFormat = SCITextFormattingStyle()
        textFormat.fontSize = 16

        axisStyle.majorTickBrush = majorPen
        axisStyle.majorGridLineBrush = majorPen
        axisStyle.gridBandBrush = SCISolidBrushStyle(colorCode: 0xE1232120)
        axisStyle.minorTickBrush = minorPen
        axisStyle.minorGridLineBrush = minorPen
        axisStyle.labelStyle = textFormat
        axisStyle.drawMinorGridLines = true
        axisStyle.drawMajorBands = true
        axis.style = axisStyle
    }

    private func setupData() {
        series = SCIXyDataSeries(xType: .int16, yType: .int16)
        TestData.testData.forEach { (testData) in
            let xGeneric = SCIGenericType(type: .int16, .init(int32Data: testData.x))
            let yGeneric = SCIGenericType(type: .int16, .init(int32Data: testData.y))
            series?.appendX(xGeneric, y: yGeneric)
        }
    }

    private func renderData() {
        let renderSeries = SCIFastColumnRenderableSeries()
        renderSeries.dataSeries = series
        sciChartSurface.renderableSeries.add(renderSeries)
    }
}



struct TestData {
    var x: Int32
    var y: Int32

    static let testData = [TestData(x: 2017, y: 5),
                           TestData(x: 2018, y: 8),
                           TestData(x: 2019, y: 2),
                           TestData(x: 2020, y: 9)]
}
0 votes
4k views

I’ve received this crash report for a long time since I use this SDK.
But now it’s the largest amount of crash report in the newest version.
Do you have any idea about this?
I use the SDK to show meter temperature and humidity data. It’s about 10k to 30k data show in the chart and every time the user has download the data or the user zoom, drag the chart will recalculate the min, max, avg number in the visible time range.
Thank you~

  • Switch Bot asked 4 years ago
  • last active 4 years ago
0 votes
0 answers
8k views

I would like to format several lines differently while still scaling them all to the same YAxis. For example if one line needs to go out to 4 decimal places but then another does not need any decimal values at all i would like those formats to be represented in all of the tooltips with said formats.

0 votes
7k views

Hi, I want to set yaxis labels outside the chart but unable to find any solution please help.

0 votes
6k views

Hello, I have tried to see if it is possible to show the rollover without showing any labels so that is is just a vertical bar. I was searching on StackOverflow and a few answers said it was not possible to omit any of the values from the graph. I did see that we can customize the cursor, is it possible to just have it be a vertical bar instead of a cross?? Then I could just use it instead of the default rollover.

I am linking a mockup we made of what we want to make. In the image, you have the graphic showing where the use as pressed, and above the graphic, we will show and update a graphic with the relevant information for that point.

Also, I will need to programmatically dismiss it so it will need to stay visible even if the user is panning or zooming.

0 votes
7k views

Currently we have two graph surfaces with two Y axes on each side and we need all of the Y axes to have fixed width size. Until now we were achieving that like this:
topGraphSurface.LeftAxisAreaForcedSize = 45;
topGraphSurface.RightAxisAreaForcedSize = 45;
bottomGraphSurface.LeftAxisAreaForcedSize = 45;
bottomGraphSurface.RightAxisAreaForcedSize = 45;

but since updating to the new SciChart v3 we get the error “SciChartSurface does not contain a definition for (Left)AxisAreaForcedSize”. I couldn’t find any information about this in the Migration guide, so is there a way to achieve this in the new version?

1 vote
5k views

How can I format the percentage values in the pie chart segments to omit the decimals? e.g i want it to show 20% instead of 20.00%. The values I pass in are always rounded

0 votes
4k views

So for both SCIZoomPanModifier and SCIXAxisDragModifier you can set a clip mode, that will cause the graph to not zoom in if you try to scroll past the edges.

This is not possible for the y-axis however, so everytime anyone scrolls up or down to far, the graph zooms in, which is not useful to anyone ever

Is there any way to change this behaviour at all?

Thanks in advance

0 votes
9k views

Hi, guys

I’m working with SCIDateTimeAxis type of the X-axis. So my question Is there possibility of skipping non-value period?

Best regards,
Sushynski Andrei

0 votes
7k views

I’m using Xamarin.iOS and the SciChart.iOS NuGet. When adding a LabelProvider to an axis the iPhoneSimulator with iOS 13.2 crashes without warning or exception back to the phone menu. This issue is not present on Android using the same API usage pattern.

This effect is not just in my own apps but can be replicated by running the latest Examples app on the same simulator. Examples which demonstrate the same behaviour include “Custom Theme”, Stacked Column Side by Side Chart”, “Using Theme Manager”, all of which set the LabelProvider in the source code.

Is this a known bug? Maybe an incompatibility with the latest version of Xamarin.iOS.

I noticed that this issue has been reported before.

This is a deal breaker for us at the moment as formatting axis labels is pretty crucial.

1 vote
5k views

I didn’t see anything in any docs, so I am just wanting to verify this info…

Is this correct that you have to link in and ship the libSwiftCore (+ other swift libs) with an app using SciCharts on iOS? When I added the chart library to my app; the app crashed at startup with missing dynamic load of libSwiftCore.dylib on a real device (emulators run fine).

Enabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings fixed this issue. But this surprised me that the SciChart library would actually require Swift.

Was this intentional; or did the library somehow pickup an unintentional reference somewhere….

1 vote
4k views

I work on a SwiftUI project that has integrated SciCharts.

What I’ve noticed is that while there are SwiftUI examples available, they are rather basic and when I replicate the example code over in my project, it does not run as we expect and in some cases does not run at all.

Currently there seems to be issues with the SwiftUI run loop, SwiftUI’s use of structs, and SciCharts use of pointers that make building complex charts within complex user interfaces rather challenging.

I needed to do a lot of work to get the SwiftUI example code to work in my project, and we’re still facing some challenges. Can we expect better SwiftUI support in the future, such as SwiftUI views included in the SDK or if this work has been done can the documentation be linked?

Showing 1 - 50 of 312 results