How do require ALL datapoints recorded for large datasets within a stock chart?
How do I ensure all data is recorded on a single amcharts3 stock chart when using fairly large datasets? Amcharts.makeChart()
seems to omit values, despite setting syncDataTimestamps: true
.
I have two datasets that I am comparing with the compared: true
setting, much like this answer. Both datasets have datetimes in the form of strings. One dataset is significantly larger than the other. Initially I had suspected that one of the datasets was not being displayed, but after setting compareGraphBullet: round
, I noticed a single bullet point,
shown in this screenshot.
var my_chart = AmCharts.makeChart("my_chart_div",
type: "stock",
theme: "light",
dataDateFormat: "YYYY-MM-DD JJ:NN:SS:QQQ",
categoryAxis:
parseDates: true,
minPeriod: 'fff'
,
categoryAxesSettings:
minPeriod: "fff",
groupToPeriods: ['fff', 'ss']
,
syncDataTimestamps: true,
dataSets: [
title: "my_first_data thing",
fieldMappings: [
fromField: "reading",
toField: "value"
],
dataProvider: data1_provider,
categoryField: "datetime",
compared: true
,
title: "my_second_data thing",
fieldMappings: [
fromField: "target_value",
toField: "value"
],
dataProvider: data2_provider,
categoryField: "datetime",
compared: true
],
panels: [
// showCategoryAxis: false,
title: "Data set #1",
recalculateToPercents: "never",
stockGraphs: [
id: "g1",
valueField: "value",
compareGraphBullet: 'round',
comparable: true,
compareField: "value"
],
stockLegend:
]
);
Edit: And here's a link to a codepen that seems to exhibit much the same issue.
amcharts amstock
add a comment |
How do I ensure all data is recorded on a single amcharts3 stock chart when using fairly large datasets? Amcharts.makeChart()
seems to omit values, despite setting syncDataTimestamps: true
.
I have two datasets that I am comparing with the compared: true
setting, much like this answer. Both datasets have datetimes in the form of strings. One dataset is significantly larger than the other. Initially I had suspected that one of the datasets was not being displayed, but after setting compareGraphBullet: round
, I noticed a single bullet point,
shown in this screenshot.
var my_chart = AmCharts.makeChart("my_chart_div",
type: "stock",
theme: "light",
dataDateFormat: "YYYY-MM-DD JJ:NN:SS:QQQ",
categoryAxis:
parseDates: true,
minPeriod: 'fff'
,
categoryAxesSettings:
minPeriod: "fff",
groupToPeriods: ['fff', 'ss']
,
syncDataTimestamps: true,
dataSets: [
title: "my_first_data thing",
fieldMappings: [
fromField: "reading",
toField: "value"
],
dataProvider: data1_provider,
categoryField: "datetime",
compared: true
,
title: "my_second_data thing",
fieldMappings: [
fromField: "target_value",
toField: "value"
],
dataProvider: data2_provider,
categoryField: "datetime",
compared: true
],
panels: [
// showCategoryAxis: false,
title: "Data set #1",
recalculateToPercents: "never",
stockGraphs: [
id: "g1",
valueField: "value",
compareGraphBullet: 'round',
comparable: true,
compareField: "value"
],
stockLegend:
]
);
Edit: And here's a link to a codepen that seems to exhibit much the same issue.
amcharts amstock
add a comment |
How do I ensure all data is recorded on a single amcharts3 stock chart when using fairly large datasets? Amcharts.makeChart()
seems to omit values, despite setting syncDataTimestamps: true
.
I have two datasets that I am comparing with the compared: true
setting, much like this answer. Both datasets have datetimes in the form of strings. One dataset is significantly larger than the other. Initially I had suspected that one of the datasets was not being displayed, but after setting compareGraphBullet: round
, I noticed a single bullet point,
shown in this screenshot.
var my_chart = AmCharts.makeChart("my_chart_div",
type: "stock",
theme: "light",
dataDateFormat: "YYYY-MM-DD JJ:NN:SS:QQQ",
categoryAxis:
parseDates: true,
minPeriod: 'fff'
,
categoryAxesSettings:
minPeriod: "fff",
groupToPeriods: ['fff', 'ss']
,
syncDataTimestamps: true,
dataSets: [
title: "my_first_data thing",
fieldMappings: [
fromField: "reading",
toField: "value"
],
dataProvider: data1_provider,
categoryField: "datetime",
compared: true
,
title: "my_second_data thing",
fieldMappings: [
fromField: "target_value",
toField: "value"
],
dataProvider: data2_provider,
categoryField: "datetime",
compared: true
],
panels: [
// showCategoryAxis: false,
title: "Data set #1",
recalculateToPercents: "never",
stockGraphs: [
id: "g1",
valueField: "value",
compareGraphBullet: 'round',
comparable: true,
compareField: "value"
],
stockLegend:
]
);
Edit: And here's a link to a codepen that seems to exhibit much the same issue.
amcharts amstock
How do I ensure all data is recorded on a single amcharts3 stock chart when using fairly large datasets? Amcharts.makeChart()
seems to omit values, despite setting syncDataTimestamps: true
.
I have two datasets that I am comparing with the compared: true
setting, much like this answer. Both datasets have datetimes in the form of strings. One dataset is significantly larger than the other. Initially I had suspected that one of the datasets was not being displayed, but after setting compareGraphBullet: round
, I noticed a single bullet point,
shown in this screenshot.
var my_chart = AmCharts.makeChart("my_chart_div",
type: "stock",
theme: "light",
dataDateFormat: "YYYY-MM-DD JJ:NN:SS:QQQ",
categoryAxis:
parseDates: true,
minPeriod: 'fff'
,
categoryAxesSettings:
minPeriod: "fff",
groupToPeriods: ['fff', 'ss']
,
syncDataTimestamps: true,
dataSets: [
title: "my_first_data thing",
fieldMappings: [
fromField: "reading",
toField: "value"
],
dataProvider: data1_provider,
categoryField: "datetime",
compared: true
,
title: "my_second_data thing",
fieldMappings: [
fromField: "target_value",
toField: "value"
],
dataProvider: data2_provider,
categoryField: "datetime",
compared: true
],
panels: [
// showCategoryAxis: false,
title: "Data set #1",
recalculateToPercents: "never",
stockGraphs: [
id: "g1",
valueField: "value",
compareGraphBullet: 'round',
comparable: true,
compareField: "value"
],
stockLegend:
]
);
Edit: And here's a link to a codepen that seems to exhibit much the same issue.
amcharts amstock
amcharts amstock
edited Nov 14 '18 at 16:12
Luke Short
asked Nov 14 '18 at 4:44
Luke ShortLuke Short
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The issue is due to your groupToPeriods
setting combined with the synchronize timestamps functionality you're using. When you set groupToPeriods
, you're instructing amCharts to group data into your specified periods when the overall maxSeries
is reached (from smallest to largest period in the array). Even though there are only a few points in your dataset, the synchronize timestamp method creates dummy points in order for data comparisons to work, so the visible points happen to get grouped into a single point in your screenshot and showing nothing at all in your codepen.
Your only options are to either remove groupToPeriods
or disable grouping entirely by setting maxSeries
to 0, but the latter impacts performance. You can find more information on how stock chart data grouping works here.
add a comment |
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%2f53293320%2fhow-do-require-all-datapoints-recorded-for-large-datasets-within-a-stock-chart%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The issue is due to your groupToPeriods
setting combined with the synchronize timestamps functionality you're using. When you set groupToPeriods
, you're instructing amCharts to group data into your specified periods when the overall maxSeries
is reached (from smallest to largest period in the array). Even though there are only a few points in your dataset, the synchronize timestamp method creates dummy points in order for data comparisons to work, so the visible points happen to get grouped into a single point in your screenshot and showing nothing at all in your codepen.
Your only options are to either remove groupToPeriods
or disable grouping entirely by setting maxSeries
to 0, but the latter impacts performance. You can find more information on how stock chart data grouping works here.
add a comment |
The issue is due to your groupToPeriods
setting combined with the synchronize timestamps functionality you're using. When you set groupToPeriods
, you're instructing amCharts to group data into your specified periods when the overall maxSeries
is reached (from smallest to largest period in the array). Even though there are only a few points in your dataset, the synchronize timestamp method creates dummy points in order for data comparisons to work, so the visible points happen to get grouped into a single point in your screenshot and showing nothing at all in your codepen.
Your only options are to either remove groupToPeriods
or disable grouping entirely by setting maxSeries
to 0, but the latter impacts performance. You can find more information on how stock chart data grouping works here.
add a comment |
The issue is due to your groupToPeriods
setting combined with the synchronize timestamps functionality you're using. When you set groupToPeriods
, you're instructing amCharts to group data into your specified periods when the overall maxSeries
is reached (from smallest to largest period in the array). Even though there are only a few points in your dataset, the synchronize timestamp method creates dummy points in order for data comparisons to work, so the visible points happen to get grouped into a single point in your screenshot and showing nothing at all in your codepen.
Your only options are to either remove groupToPeriods
or disable grouping entirely by setting maxSeries
to 0, but the latter impacts performance. You can find more information on how stock chart data grouping works here.
The issue is due to your groupToPeriods
setting combined with the synchronize timestamps functionality you're using. When you set groupToPeriods
, you're instructing amCharts to group data into your specified periods when the overall maxSeries
is reached (from smallest to largest period in the array). Even though there are only a few points in your dataset, the synchronize timestamp method creates dummy points in order for data comparisons to work, so the visible points happen to get grouped into a single point in your screenshot and showing nothing at all in your codepen.
Your only options are to either remove groupToPeriods
or disable grouping entirely by setting maxSeries
to 0, but the latter impacts performance. You can find more information on how stock chart data grouping works here.
answered Nov 14 '18 at 18:53
xorsparkxorspark
9,77621026
9,77621026
add a comment |
add a comment |
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.
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%2f53293320%2fhow-do-require-all-datapoints-recorded-for-large-datasets-within-a-stock-chart%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