Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using highcharts-regression plugin in iOS highchart #437

Closed
sagar-kudale30 opened this issue May 15, 2024 · 6 comments
Closed

Using highcharts-regression plugin in iOS highchart #437

sagar-kudale30 opened this issue May 15, 2024 · 6 comments

Comments

@sagar-kudale30
Copy link

sagar-kudale30 commented May 15, 2024

Is there a way to use Highchart-regression (https://www.npmjs.com/package/highcharts-regression) in iOS through plugin.

We want to show linear regression series with scatter chart.

@MikolajMichalczak
Copy link
Contributor

Hi @sagar-kudale30!
Here is a demo of a scatter plot with a regression line on iOS: https://www.highcharts.com/demo/ios/combo-regression. There is no way to use custom plugins at the moment.

@sagar-kudale30
Copy link
Author

Hey @MikolajMichalczak Thanks for the reply and demo link.

We are using JSON to load charts via loadJSONOptions method so it will not help us in our case.

@MikolajMichalczak
Copy link
Contributor

I recreated this chart with the use of loadJSONOptions method:

let options = [
  "series": [
    [
      "type": "line",
      "data": [[0, 1.11], [5, 4.51]]
    ] as [String: Any],
    [
      "type": "scatter",
      "data": [1, 1.5, 2.8, 3.5, 3.9, 4.2]
    ] as [String: Any]
  ],
  "title": [
    "text": "Demo chart"
  ],
  "chart": [
    "type":"column",
    "renderTo":"container"
  ]
] as [String: Any]

chart.loadJSONOptions(options)

Unfortunately, you have to calculate line series data by yourself according to your scatter data.

@MikolajMichalczak
Copy link
Contributor

@sagar-kudale30 Can i close this issue?

@sagar-kudale30
Copy link
Author

sagar-kudale30 commented May 17, 2024

Hey @MikolajMichalczak This will not help us as we don't want to do line series calculation ourself. We are displaying same chart on web as well with the help on Highchats-regression.
Do we have any plan to add native support for linear regression or Plugin for same in near future for iOS?

@MikolajMichalczak
Copy link
Contributor

@sagar-kudale30 Unfortunately, there are currently no options or plans to support the use of custom plugins, including regression, either on Android or iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants