Highcharts use legend symbol and legend parms, not scatter marker symbols - in scatter plot












1














I have built multiple bar charts using the same legend setup but it does not seem to transfer to a scatter plot. It instead uses the scatter marker symbols inside the legend.



I need the marker symbols to be circle and the legend symbols to be square but without using a custom legend but can't seem to get there



These are the legend options for bar graphs I am using. It works as intended but when added to the scatter plot, the legend symbol options are not being honored while the itemStyle, cursor, align and verticalAlign are...but the legend symbols are coming from the scatter marker symbols and seem to be linked.



legend: {
enabled: true,
symbolRadius: 0,
symbolHeight: 16,
symbolPadding: 15,
itemMarginBottom: 20,
itemStyle: {
fontFamily: chartFont,
fontWeight: 'normal',
fontSize
},
cursor: 'pointer',
align: 'left',
verticalAlign: 'top'
}


The marker symbol options are defined in the series array as:



marker: {
enabled: true, symbol: 'circle', radius: 15
}









share|improve this question
























  • I think that a bug, you should summit this issue on the Github repo
    – Core972
    Nov 10 '18 at 19:58










  • @Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
    – jlbriggs
    Nov 11 '18 at 18:15










  • See if this topic helps: stackoverflow.com/questions/16812476/…
    – jlbriggs
    Nov 11 '18 at 18:16










  • Try a scatter chart with this .
    – Core972
    Nov 11 '18 at 18:32










  • @Core972 gave squareSymbol a shot, but no luck, thanks
    – james
    Nov 12 '18 at 14:17
















1














I have built multiple bar charts using the same legend setup but it does not seem to transfer to a scatter plot. It instead uses the scatter marker symbols inside the legend.



I need the marker symbols to be circle and the legend symbols to be square but without using a custom legend but can't seem to get there



These are the legend options for bar graphs I am using. It works as intended but when added to the scatter plot, the legend symbol options are not being honored while the itemStyle, cursor, align and verticalAlign are...but the legend symbols are coming from the scatter marker symbols and seem to be linked.



legend: {
enabled: true,
symbolRadius: 0,
symbolHeight: 16,
symbolPadding: 15,
itemMarginBottom: 20,
itemStyle: {
fontFamily: chartFont,
fontWeight: 'normal',
fontSize
},
cursor: 'pointer',
align: 'left',
verticalAlign: 'top'
}


The marker symbol options are defined in the series array as:



marker: {
enabled: true, symbol: 'circle', radius: 15
}









share|improve this question
























  • I think that a bug, you should summit this issue on the Github repo
    – Core972
    Nov 10 '18 at 19:58










  • @Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
    – jlbriggs
    Nov 11 '18 at 18:15










  • See if this topic helps: stackoverflow.com/questions/16812476/…
    – jlbriggs
    Nov 11 '18 at 18:16










  • Try a scatter chart with this .
    – Core972
    Nov 11 '18 at 18:32










  • @Core972 gave squareSymbol a shot, but no luck, thanks
    – james
    Nov 12 '18 at 14:17














1












1








1







I have built multiple bar charts using the same legend setup but it does not seem to transfer to a scatter plot. It instead uses the scatter marker symbols inside the legend.



I need the marker symbols to be circle and the legend symbols to be square but without using a custom legend but can't seem to get there



These are the legend options for bar graphs I am using. It works as intended but when added to the scatter plot, the legend symbol options are not being honored while the itemStyle, cursor, align and verticalAlign are...but the legend symbols are coming from the scatter marker symbols and seem to be linked.



legend: {
enabled: true,
symbolRadius: 0,
symbolHeight: 16,
symbolPadding: 15,
itemMarginBottom: 20,
itemStyle: {
fontFamily: chartFont,
fontWeight: 'normal',
fontSize
},
cursor: 'pointer',
align: 'left',
verticalAlign: 'top'
}


The marker symbol options are defined in the series array as:



marker: {
enabled: true, symbol: 'circle', radius: 15
}









share|improve this question















I have built multiple bar charts using the same legend setup but it does not seem to transfer to a scatter plot. It instead uses the scatter marker symbols inside the legend.



I need the marker symbols to be circle and the legend symbols to be square but without using a custom legend but can't seem to get there



These are the legend options for bar graphs I am using. It works as intended but when added to the scatter plot, the legend symbol options are not being honored while the itemStyle, cursor, align and verticalAlign are...but the legend symbols are coming from the scatter marker symbols and seem to be linked.



legend: {
enabled: true,
symbolRadius: 0,
symbolHeight: 16,
symbolPadding: 15,
itemMarginBottom: 20,
itemStyle: {
fontFamily: chartFont,
fontWeight: 'normal',
fontSize
},
cursor: 'pointer',
align: 'left',
verticalAlign: 'top'
}


The marker symbol options are defined in the series array as:



marker: {
enabled: true, symbol: 'circle', radius: 15
}






highcharts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 17:26

























asked Nov 9 '18 at 18:32









james

85




85












  • I think that a bug, you should summit this issue on the Github repo
    – Core972
    Nov 10 '18 at 19:58










  • @Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
    – jlbriggs
    Nov 11 '18 at 18:15










  • See if this topic helps: stackoverflow.com/questions/16812476/…
    – jlbriggs
    Nov 11 '18 at 18:16










  • Try a scatter chart with this .
    – Core972
    Nov 11 '18 at 18:32










  • @Core972 gave squareSymbol a shot, but no luck, thanks
    – james
    Nov 12 '18 at 14:17


















  • I think that a bug, you should summit this issue on the Github repo
    – Core972
    Nov 10 '18 at 19:58










  • @Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
    – jlbriggs
    Nov 11 '18 at 18:15










  • See if this topic helps: stackoverflow.com/questions/16812476/…
    – jlbriggs
    Nov 11 '18 at 18:16










  • Try a scatter chart with this .
    – Core972
    Nov 11 '18 at 18:32










  • @Core972 gave squareSymbol a shot, but no luck, thanks
    – james
    Nov 12 '18 at 14:17
















I think that a bug, you should summit this issue on the Github repo
– Core972
Nov 10 '18 at 19:58




I think that a bug, you should summit this issue on the Github repo
– Core972
Nov 10 '18 at 19:58












@Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
– jlbriggs
Nov 11 '18 at 18:15




@Core972 why do you think this is a bug? This is the expected behavior - the chart will use a symbol appropriate to the series and/or marker type. I am not aware of configuration options to change the symbol in the legend, though there may well be a workaround...
– jlbriggs
Nov 11 '18 at 18:15












See if this topic helps: stackoverflow.com/questions/16812476/…
– jlbriggs
Nov 11 '18 at 18:16




See if this topic helps: stackoverflow.com/questions/16812476/…
– jlbriggs
Nov 11 '18 at 18:16












Try a scatter chart with this .
– Core972
Nov 11 '18 at 18:32




Try a scatter chart with this .
– Core972
Nov 11 '18 at 18:32












@Core972 gave squareSymbol a shot, but no luck, thanks
– james
Nov 12 '18 at 14:17




@Core972 gave squareSymbol a shot, but no luck, thanks
– james
Nov 12 '18 at 14:17












1 Answer
1






active

oldest

votes


















0














To acheieve the wanted result, you can use the way of drawing legend symbol from column series and set symbolRadius to 0:



Highcharts.seriesTypes.scatter.prototype.drawLegendSymbol =
Highcharts.seriesTypes.column.prototype.drawLegendSymbol;


Highcharts.chart('container', {
series: [{
type: 'scatter',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}],
legend: {
symbolRadius: 0
}
});


Live demo: http://jsfiddle.net/BlackLabel/4epgLos0/



Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts






share|improve this answer





















  • in the snippet I provided, I already have symbolRadius set to 0.
    – james
    Nov 12 '18 at 14:14












  • Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
    – ppotaczek
    Nov 12 '18 at 15:01










  • oh right, I will try that out, thanks!
    – james
    Nov 12 '18 at 17:14










  • that did the trick, great work and thanks again!
    – james
    Nov 12 '18 at 17:20











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231491%2fhighcharts-use-legend-symbol-and-legend-parms-not-scatter-marker-symbols-in-s%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









0














To acheieve the wanted result, you can use the way of drawing legend symbol from column series and set symbolRadius to 0:



Highcharts.seriesTypes.scatter.prototype.drawLegendSymbol =
Highcharts.seriesTypes.column.prototype.drawLegendSymbol;


Highcharts.chart('container', {
series: [{
type: 'scatter',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}],
legend: {
symbolRadius: 0
}
});


Live demo: http://jsfiddle.net/BlackLabel/4epgLos0/



Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts






share|improve this answer





















  • in the snippet I provided, I already have symbolRadius set to 0.
    – james
    Nov 12 '18 at 14:14












  • Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
    – ppotaczek
    Nov 12 '18 at 15:01










  • oh right, I will try that out, thanks!
    – james
    Nov 12 '18 at 17:14










  • that did the trick, great work and thanks again!
    – james
    Nov 12 '18 at 17:20
















0














To acheieve the wanted result, you can use the way of drawing legend symbol from column series and set symbolRadius to 0:



Highcharts.seriesTypes.scatter.prototype.drawLegendSymbol =
Highcharts.seriesTypes.column.prototype.drawLegendSymbol;


Highcharts.chart('container', {
series: [{
type: 'scatter',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}],
legend: {
symbolRadius: 0
}
});


Live demo: http://jsfiddle.net/BlackLabel/4epgLos0/



Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts






share|improve this answer





















  • in the snippet I provided, I already have symbolRadius set to 0.
    – james
    Nov 12 '18 at 14:14












  • Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
    – ppotaczek
    Nov 12 '18 at 15:01










  • oh right, I will try that out, thanks!
    – james
    Nov 12 '18 at 17:14










  • that did the trick, great work and thanks again!
    – james
    Nov 12 '18 at 17:20














0












0








0






To acheieve the wanted result, you can use the way of drawing legend symbol from column series and set symbolRadius to 0:



Highcharts.seriesTypes.scatter.prototype.drawLegendSymbol =
Highcharts.seriesTypes.column.prototype.drawLegendSymbol;


Highcharts.chart('container', {
series: [{
type: 'scatter',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}],
legend: {
symbolRadius: 0
}
});


Live demo: http://jsfiddle.net/BlackLabel/4epgLos0/



Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts






share|improve this answer












To acheieve the wanted result, you can use the way of drawing legend symbol from column series and set symbolRadius to 0:



Highcharts.seriesTypes.scatter.prototype.drawLegendSymbol =
Highcharts.seriesTypes.column.prototype.drawLegendSymbol;


Highcharts.chart('container', {
series: [{
type: 'scatter',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}],
legend: {
symbolRadius: 0
}
});


Live demo: http://jsfiddle.net/BlackLabel/4epgLos0/



Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 12 '18 at 14:02









ppotaczek

3,896129




3,896129












  • in the snippet I provided, I already have symbolRadius set to 0.
    – james
    Nov 12 '18 at 14:14












  • Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
    – ppotaczek
    Nov 12 '18 at 15:01










  • oh right, I will try that out, thanks!
    – james
    Nov 12 '18 at 17:14










  • that did the trick, great work and thanks again!
    – james
    Nov 12 '18 at 17:20


















  • in the snippet I provided, I already have symbolRadius set to 0.
    – james
    Nov 12 '18 at 14:14












  • Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
    – ppotaczek
    Nov 12 '18 at 15:01










  • oh right, I will try that out, thanks!
    – james
    Nov 12 '18 at 17:14










  • that did the trick, great work and thanks again!
    – james
    Nov 12 '18 at 17:20
















in the snippet I provided, I already have symbolRadius set to 0.
– james
Nov 12 '18 at 14:14






in the snippet I provided, I already have symbolRadius set to 0.
– james
Nov 12 '18 at 14:14














Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
– ppotaczek
Nov 12 '18 at 15:01




Hi james, Yes, but you did not overwrite the method in scatter prototype. Please check the live demo above.
– ppotaczek
Nov 12 '18 at 15:01












oh right, I will try that out, thanks!
– james
Nov 12 '18 at 17:14




oh right, I will try that out, thanks!
– james
Nov 12 '18 at 17:14












that did the trick, great work and thanks again!
– james
Nov 12 '18 at 17:20




that did the trick, great work and thanks again!
– james
Nov 12 '18 at 17:20


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231491%2fhighcharts-use-legend-symbol-and-legend-parms-not-scatter-marker-symbols-in-s%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Florida Star v. B. J. F.

Error while running script in elastic search , gateway timeout

Adding quotations to stringified JSON object values