Images/Icons in datalabel not getting exported - highchart treemap -


i trying have custom data label icon. renders on export, images doesn't appear. did try different formats of images doesnt seem work either.

am missing in configuration ?

highcharts.chart('container', {      series: [{          type: "treemap",          layoutalgorithm: 'squarified',          alternatestartingdirection: true,          levels: [{              level: 1,              layoutalgorithm: 'sliceanddice',              datalabels: {                  enabled: true,                  align: 'left',                  usehtml: true,                  style: {                      fontsize: '15px',                      fontweight: 'bold'                  },                  formatter: function() {                   return '<div><span>'+this.point.name+'</span>-<span>'+this.point.value+'</span><img src='+this.point.icon+' width="30px"/></div>'                  }              }          }],          data: [{              id: 'a',              name: 'apples',              color: "#ec2500",              value: 10,              icon: "data:image/svg+xml;base64,pd94bwwgdmvyc2lvbj0ims4wiia/pjwhre9dvflqrsbzdmcgifbvqkxjqyanls8vvzndly9eveqgu1zhideums8vru4nicanahr0cdovl3d3dy53my5vcmcvr3jhcghpy3mvu1zhlzeums9eveqvc3znmteuzhrkjz48c3znigvuywjszs1iywnrz3jvdw5kpsjuzxcgmcawiduwiduwiibozwlnahq9ijuwchgiiglkpsjdyxbhxzeiihzlcnnpb249ijeumsigdmlld0jved0imcawiduwiduwiib3awr0ad0intbwecigeg1sonnwywnlpsjwcmvzzxj2zsigeg1sbnm9imh0dha6ly93d3cudzmub3jnlziwmdavc3zniib4bwxuczp4bgluaz0iahr0cdovl3d3dy53my5vcmcvmtk5os94bgluayi+pgc+phbhdgggzd0itti5ljk4lde4lji1mmmtms4xmzcsmc0yljazmswwlji3ns0yljgyncwwljuyyy0wljewoswwljazmi0wljixmywwlja2ns0wljmxnswwlja5mwwzljc0ny0zljgwosagigmwljmxoc0wljmynywwljmyltauoduyltaumdaylteumty5yy0wljmyltaumzizltauodq0ltaumzi2lteumtytmc4wmdjsltmunja0ldmunjcydi02ljc0ngmwljawms0wljq1oc0wljm2ns0wljgzns0wljgxmy0wljgzmyagigmtmc40ntgsmc4wmdetmc44mjmsmc4znjktmc44mjmsmc44mzjsltaumdayldgumzazyy0wljq1mi0wlja4ltauodg4ltaumja2lteumzmzltaumzrjltaunzkxltaumjq2lteunjk1ltaunti0ltiuoditmc41mjqgicbjltqumzi0ldatny40njesmi45njqtny40njesny4wmzhjmcwyljeynywxljayniw0ljg2mywxljuxocw2lje3n2wwlje0ldaumzy3yzaumti3ldaumzuzldaumzixldauotm1ldauntisms41mtmgicbjmc4yntcsmc43nzqsmc41mjisms41ntesmc42ndisms44ndhjms4wmtysmi41nswylji1ocw0ljgyocw2ljiymyw0ljgzmmw2ljc3my0wljawngmzljk2niwwljawncw1ljiwny0ylji3ocw2ljiyos00ljgyncagigmwljexny0wlji5mswwljm4lteumdcxldaunjqxlteuodqyyzaumtk1ltauntg0ldaumzk2lteumty0ldauntixlteunte2bdaumtm1ltaumzy5yzaundktms4zmtqsms41mjetnc4wndcsms41mjmtni4xnzqgicbdmzcundmsmjeumje0ldm0ljmsmtgumjuyldi5ljk4lde4lji1mnogttm0ljm3nywzmc44nzlsltaumtqzldaumzg1yy0wljezmywwljm2ltaumzm0ldauotu5ltaunti5ldeuntuzicagyy0wlji1miwwljczni0wljuwnswxljq3ni0wljyxnswxljc2mwmtms4wndgsmi42mjitms45nzksmy43otmtnc43mdmsmy43otfsltyunzcyltaumdazyy0yljczocwwljawms0zljy1os0xlje3mi00ljcwmi0zljc5miagigmtmc4xmtytmc4yoditmc4znjctms4wmjutmc42mtytms43njnjltaumtk3ltauntk2ltaundaxlteumtg4ltauntmzlteuntuzbc0wlje0nc0wljm4yy0wljqxoc0xljeyos0xljqxltmunzy3lteundetns41odygicbjmc0zlje2niwyljm5ni01ljm4myw1ljgyms01ljm4nmmwljg4niwwljawmywxlju4ocwwljiyldiumzq1ldaundvjmc43odqsmc4yndmsms42mdismc40otcsmi42mjgsmc40otmgicbjms4wmjqtmc4wmdmsms44nc0wlji0oswyljyzmi0wljq5yzaunzq1ltaumjmsms40ntitmc40ndqsmi4znditmc40ndrjmy40mjytmc4wmdqsns44mtksmi4ymtisns44mtksns4zodigicbdmzuunzkxldi3ljeyldm0ljgwmswyos43niwznc4znzcsmzauodc5eiivpjwvzz48l3n2zz4="          }, {              id: 'o',              name: 'oranges',              color: '#ec9800',              value: 10,              icon: "data:image/svg+xml;base64,pd94bwwgdmvyc2lvbj0ims4wiia/pjwhre9dvflqrsbzdmcgifbvqkxjqyanls8vvzndly9eveqgu1zhideums8vru4nicanahr0cdovl3d3dy53my5vcmcvr3jhcghpy3mvu1zhlzeums9eveqvc3znmteuzhrkjz48c3znigvuywjszs1iywnrz3jvdw5kpsjuzxcgmcawiduwiduwiibozwlnahq9ijuwchgiiglkpsjdyxbhxzeiihzlcnnpb249ijeumsigdmlld0jved0imcawiduwiduwiib3awr0ad0intbwecigeg1sonnwywnlpsjwcmvzzxj2zsigeg1sbnm9imh0dha6ly93d3cudzmub3jnlziwmdavc3zniib4bwxuczp4bgluaz0iahr0cdovl3d3dy53my5vcmcvmtk5os94bgluayi+pgc+phbhdgggzd0itti1ljawnswxmi41nzjjltyuoduyltaumda3lteyljqzmsw1lju3ms0xmi40mzusmtiundi1yy0wljawmiw2ljg1niw1lju3ncwxmi40mjgsmtiundiyldeyljqzicagqzmxljg1ncwzny40mjusmzcundmsmzeuodu0ldm3ljqzldi1qzm3ljqzniwxoc4xndysmzeuodu3ldeylju3miwyns4wmdusmtiuntcyeibnmjquotk0ldm1ljc5icagyy01ljk0nywwltewljc4oc00ljg0ms0xmc43odytmtaunzk2yzaumdazltuuotq5ldquodq2ltewljc4nywxmc43otctmtaunzg3yzuuotq2ldasmtaunzk0ldquodqyldewljc4niwxmc43otegicbdmzuunzk2ldmwljk2ldmwljk1mywzns43oswync45otqsmzuunzl6ii8+phbvbhlnb24gcg9pbnrzpsiyns43nzcsmtgumjm0idi1ljaxlde2ljexnsaync4ymjksmtgumjm2idiyljawncwxny44ndqgmjmundq4lde5lju4msaymi4wmdmsmjeumzexidi0ljiynywymc45mjqgicagmjuumda1ldizlja0myayns43nzcsmjauoti0idi4ljawnswyms4zmtkgmjyuntu1lde5lju4nsayoc4wmdmsmtcuoduyicailz48l2c+pc9zdmc+"          }]      }],      title: {          text: 'fruit consumption'      }  });
#container {      min-width: 300px;      max-width: 600px;      margin: 0 auto;  }
<script src="https://code.highcharts.com/highcharts.js"></script>  <script src="https://code.highcharts.com/modules/treemap.js"></script>  <script src="http://code.highcharts.com/modules/exporting.js"></script>  <div id="container"></div>

if want exporting module supports using html language example in formatters, have set "allowhtml: true" in exporting object, below:

exporting: {     allowhtml: true, } 

there api reference: http://api.highcharts.com/highcharts/exporting.allowhtml

jsfiddle: https://jsfiddle.net/daniel_s/9g90hdad/

best regards!


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -