You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/11/23 10:52:02 UTC

[GitHub] [incubator-echarts] markusdanek opened a new issue #13666: Sankey chart colors based on top node

markusdanek opened a new issue #13666:
URL: https://github.com/apache/incubator-echarts/issues/13666


   ### Version
   4.9.0
   
   ### Steps to reproduce
   I have the following chart options in my Angular application for a sankey chart:
   
       this.chartOptions = {
         color: ["#922752", "#ff9822", "#4390e1", "#53bcbc"],
         tooltip: {
           backgroundColor: "#ffffff",
           borderWidth: 1,
           formatter: `<b>{b}</b><br/>{c} ${this.unit}`,
           padding: 8,
           textStyle: { color: "#212529" },
           trigger: "item",
           triggerOn: "mousemove",
         },
         series: [
           {
             type: "sankey",
             left: 0,
             top: 0,
             bottom: 0,
             nodeWidth: 10,
             data: this.seriesData,
             draggable: false,
             label: {
               fontWeight: "bold",
               formatter: "{b}",
             },
             links: this.seriesLinks,
             focusNodeAdjacency: "allEdges",
             itemStyle: {
               borderWidth: 0,
             },
             lineStyle: {
               color: "source",
               curveness: 0.5,
             },
           },
         ],
       };
   
   ### What is expected?
   This is the current result:
   
   [![sankey chart current][1]][1]
     [1]: https://i.stack.imgur.com/nB7UW.png
   
   ### What is actually happening?
   But the goal is that on the first level each node should have another color and the levels underneath it (depth  1) should have the parent color but only with -10% color saturation.
   
   Example:
   
   [![sankey chart goal][2]][2]
   
     [1]: https://i.stack.imgur.com/nB7UW.png
     [2]: https://i.stack.imgur.com/9AQDC.png
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org