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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

I need someone to develop this chart for me and I will provide a JSON, for the data.

https://www.youtube.com/watch?v=t29Zl-7QyMw&t=215s
Please go to time line 3:22

I have been struggling in the documentation and if someone can create this chart for me, I will be more than happy to pay you.

The chart would have to be created for Swift 4 please.

Robert

Version
Swift 4
  • You must to post comments
0
0

Hi Robert,

We have been working on updating the documentation for SciChart iOS v2.1. The first draft went live yesterday.

In the article The iOS Line Series Type we have a Swift 4 example of how to create a line chart from beginning to end.

The source code looks like this

// Create a SCIChartSurface instance 
var sciChartSurface = SCIChartSurface(frame: frame)

// NOTE: You will need to add the SCIChartSurface as a SubView to your View 
// 

// Declare a new XyDataSeries with XType Float, and YType Float
let dataSeries = SCIXyDataSeries(xType: .float, yType: .float)

// Append some data. SCIGenericStruct converts without boxing of primitives
let dataCount: Int = 20
for i in 0..<dataCount {
    let time = (10.0 * Double(i)) / Double(dataCount)
    let x: Double = time;
    let y: Double = Double(arc4random_uniform(20))
    dataSeries.appendX(SCIGeneric(x), y: SCIGeneric(y))
}

// Create a SCIFastLineRenderableSeries and apply DataSeries
let lineRenderSeries = SCIFastLineRenderableSeries()
lineRenderSeries.strokeStyle = SCISolidPenStyle(colorCode: 0xff279b27, withThickness: 1.0)
lineRenderSeries.dataSeries = dataSeries

// Note Surface must have an XAxis/YAxis of type SCINumericAxis to match the float,float data
let xAxis = SCINumericAxis()
xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
sciChartSurface.yAxes.add(xAxis)

let yAxis = SCINumericAxis()
yAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
sciChartSurface.xAxes.add(yAxis)

// Add the Line Series to an existing SciChartSurface
sciChartSurface.renderableSeries.add(lineRenderSeries)

The only part you need to do is to ensure the sciChartSurface is included as a SubView in your View. For guidance, our iOS Chart Tutorial 02 – Creating a SciChartSurface shows how and when to add the sciChartSurface as a subview.

Please let me know if this helps,

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.