Highcharts categories with many curves is not working in iOS
I'm new using Highcharts. Using it in iOS (which is pretty much the same as JS) I have this piece of code for testing:
private func initChart()
let chart = HIChart()
let chartOptions = HIOptions()
chartOptions.chart = chart
chart.type = "line"
chartOptions.title = HITitle()
chartOptions.title.text = "Auction Details"
chartOptions.subtitle = HISubtitle()
chartOptions.subtitle.text = "P&L Curves"
let xAxis = HIXAxis()
xAxis.title = HITitle()
xAxis.title.text = "Time"
xAxis.categories = ["10-01-2018", "23-03-2018", "10-04-2018", "30-04-2018", "01-05-2018", "14-09-2018", "10-011-2018", "22-11-2018"]
chartOptions.xAxis = [xAxis]
let yAxis = HIYAxis()
yAxis.title = HITitle()
yAxis.title.text = "Money"
yAxis.min = 0.0
chartOptions.yAxis = [yAxis]
let seriesRewards = HISeries()
seriesRewards.name = "Rewards"
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2], ["22-11-2018",7.9]]
let seriesPrice = HISeries()
seriesPrice.name = "Price"
seriesPrice.data = [["23-03-2018",42.4], ["23-03-2018",34.2], ["10-04-2018",61.1], ["01-05-2018",87.0], ["14-09-2018",25.9], ["22-11-2018",100.1], ["01-12-2018",95.9], ["22-12-2018",81.9]]
chartOptions.series = [seriesRewards, seriesPrice]
chartView.options = chartOptions
This runs perfectly but it I the points for the 1st series do not match with what I said... pls take a look to the following image:
My question is, seriesRewards is defined like this:
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2],
["22-11-2018",7.9]]
Why the last point is not shown in the correct position in the chart?
Regards
ios swift highcharts
add a comment |
I'm new using Highcharts. Using it in iOS (which is pretty much the same as JS) I have this piece of code for testing:
private func initChart()
let chart = HIChart()
let chartOptions = HIOptions()
chartOptions.chart = chart
chart.type = "line"
chartOptions.title = HITitle()
chartOptions.title.text = "Auction Details"
chartOptions.subtitle = HISubtitle()
chartOptions.subtitle.text = "P&L Curves"
let xAxis = HIXAxis()
xAxis.title = HITitle()
xAxis.title.text = "Time"
xAxis.categories = ["10-01-2018", "23-03-2018", "10-04-2018", "30-04-2018", "01-05-2018", "14-09-2018", "10-011-2018", "22-11-2018"]
chartOptions.xAxis = [xAxis]
let yAxis = HIYAxis()
yAxis.title = HITitle()
yAxis.title.text = "Money"
yAxis.min = 0.0
chartOptions.yAxis = [yAxis]
let seriesRewards = HISeries()
seriesRewards.name = "Rewards"
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2], ["22-11-2018",7.9]]
let seriesPrice = HISeries()
seriesPrice.name = "Price"
seriesPrice.data = [["23-03-2018",42.4], ["23-03-2018",34.2], ["10-04-2018",61.1], ["01-05-2018",87.0], ["14-09-2018",25.9], ["22-11-2018",100.1], ["01-12-2018",95.9], ["22-12-2018",81.9]]
chartOptions.series = [seriesRewards, seriesPrice]
chartView.options = chartOptions
This runs perfectly but it I the points for the 1st series do not match with what I said... pls take a look to the following image:
My question is, seriesRewards is defined like this:
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2],
["22-11-2018",7.9]]
Why the last point is not shown in the correct position in the chart?
Regards
ios swift highcharts
1
You're usingxAxis.categories
, so each point belongs to the particular category. What you need is xAxis typedatetime
and data passed as[[1542014107109, 23.4], ....... ]
->[timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type
– Wojciech Chmiel
Nov 12 '18 at 9:20
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47
add a comment |
I'm new using Highcharts. Using it in iOS (which is pretty much the same as JS) I have this piece of code for testing:
private func initChart()
let chart = HIChart()
let chartOptions = HIOptions()
chartOptions.chart = chart
chart.type = "line"
chartOptions.title = HITitle()
chartOptions.title.text = "Auction Details"
chartOptions.subtitle = HISubtitle()
chartOptions.subtitle.text = "P&L Curves"
let xAxis = HIXAxis()
xAxis.title = HITitle()
xAxis.title.text = "Time"
xAxis.categories = ["10-01-2018", "23-03-2018", "10-04-2018", "30-04-2018", "01-05-2018", "14-09-2018", "10-011-2018", "22-11-2018"]
chartOptions.xAxis = [xAxis]
let yAxis = HIYAxis()
yAxis.title = HITitle()
yAxis.title.text = "Money"
yAxis.min = 0.0
chartOptions.yAxis = [yAxis]
let seriesRewards = HISeries()
seriesRewards.name = "Rewards"
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2], ["22-11-2018",7.9]]
let seriesPrice = HISeries()
seriesPrice.name = "Price"
seriesPrice.data = [["23-03-2018",42.4], ["23-03-2018",34.2], ["10-04-2018",61.1], ["01-05-2018",87.0], ["14-09-2018",25.9], ["22-11-2018",100.1], ["01-12-2018",95.9], ["22-12-2018",81.9]]
chartOptions.series = [seriesRewards, seriesPrice]
chartView.options = chartOptions
This runs perfectly but it I the points for the 1st series do not match with what I said... pls take a look to the following image:
My question is, seriesRewards is defined like this:
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2],
["22-11-2018",7.9]]
Why the last point is not shown in the correct position in the chart?
Regards
ios swift highcharts
I'm new using Highcharts. Using it in iOS (which is pretty much the same as JS) I have this piece of code for testing:
private func initChart()
let chart = HIChart()
let chartOptions = HIOptions()
chartOptions.chart = chart
chart.type = "line"
chartOptions.title = HITitle()
chartOptions.title.text = "Auction Details"
chartOptions.subtitle = HISubtitle()
chartOptions.subtitle.text = "P&L Curves"
let xAxis = HIXAxis()
xAxis.title = HITitle()
xAxis.title.text = "Time"
xAxis.categories = ["10-01-2018", "23-03-2018", "10-04-2018", "30-04-2018", "01-05-2018", "14-09-2018", "10-011-2018", "22-11-2018"]
chartOptions.xAxis = [xAxis]
let yAxis = HIYAxis()
yAxis.title = HITitle()
yAxis.title.text = "Money"
yAxis.min = 0.0
chartOptions.yAxis = [yAxis]
let seriesRewards = HISeries()
seriesRewards.name = "Rewards"
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2], ["22-11-2018",7.9]]
let seriesPrice = HISeries()
seriesPrice.name = "Price"
seriesPrice.data = [["23-03-2018",42.4], ["23-03-2018",34.2], ["10-04-2018",61.1], ["01-05-2018",87.0], ["14-09-2018",25.9], ["22-11-2018",100.1], ["01-12-2018",95.9], ["22-12-2018",81.9]]
chartOptions.series = [seriesRewards, seriesPrice]
chartView.options = chartOptions
This runs perfectly but it I the points for the 1st series do not match with what I said... pls take a look to the following image:
My question is, seriesRewards is defined like this:
seriesRewards.data = [["10-01-2018", 23.4], ["23-03-2018", 34.2],
["22-11-2018",7.9]]
Why the last point is not shown in the correct position in the chart?
Regards
ios swift highcharts
ios swift highcharts
asked Nov 12 '18 at 2:26
Freddy Martinez Garcia
344
344
1
You're usingxAxis.categories
, so each point belongs to the particular category. What you need is xAxis typedatetime
and data passed as[[1542014107109, 23.4], ....... ]
->[timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type
– Wojciech Chmiel
Nov 12 '18 at 9:20
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47
add a comment |
1
You're usingxAxis.categories
, so each point belongs to the particular category. What you need is xAxis typedatetime
and data passed as[[1542014107109, 23.4], ....... ]
->[timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type
– Wojciech Chmiel
Nov 12 '18 at 9:20
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47
1
1
You're using
xAxis.categories
, so each point belongs to the particular category. What you need is xAxis type datetime
and data passed as [[1542014107109, 23.4], ....... ]
-> [timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type– Wojciech Chmiel
Nov 12 '18 at 9:20
You're using
xAxis.categories
, so each point belongs to the particular category. What you need is xAxis type datetime
and data passed as [[1542014107109, 23.4], ....... ]
-> [timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type– Wojciech Chmiel
Nov 12 '18 at 9:20
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255272%2fhighcharts-categories-with-many-curves-is-not-working-in-ios%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255272%2fhighcharts-categories-with-many-curves-is-not-working-in-ios%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You're using
xAxis.categories
, so each point belongs to the particular category. What you need is xAxis typedatetime
and data passed as[[1542014107109, 23.4], ....... ]
->[timestamp, y-value]
. Check docs: api.highcharts.com/highcharts/xAxis.type– Wojciech Chmiel
Nov 12 '18 at 9:20
Thanks a lot @WojciechChmiel, but now I have another issue. Pints don't appear in the curve if I remove xAxis.categories... because if you see the image above, each point has a circle or a diamond as icon or something like that to represent the point... using your approach the curve is ok, but I'm missing this. Any idea how to enable them in iOS?
– Freddy Martinez Garcia
Nov 13 '18 at 2:54
Have you tried just enable the markers? Api: api.highcharts.com/ios/highcharts.
– Wojciech Chmiel
Nov 19 '18 at 11:47