Функция развертки Highcharts не работает под углом, используя директиву highcharts-ng - PullRequest
0 голосов
/ 17 января 2019
$scope.chartOptions = { [  
   {  
      "options":{  
         "chart":{  
            "plotBorderWidth":1,
            "events":{  

            },
            "zoomType":"xy",
            "type":"column"
         },
         "legend":{  
            "enabled":true,
            "floating":false,
            "align":"left",
            "maxHeight":60,
            "itemWidth":100
         },
         "plotOptions":{  
            "line":{  
               "dataLabels":{  
                  "enabled":true,
                  "color":"black",
                  "style":{  
                     "fontSize":"8px"
                  }
               },
               "series":{  
                  "color":"#FFFFFFF"
               }
            },
            "column":{  
               "colorByPoint":true,
               "dataLabels":{  
                  "enabled":true,
                  "color":"black",
                  "style":{  
                     "fontSize":"8px"
                  }
               }
            },
            "area":{  
               "dataLabels":{  
                  "enabled":true,
                  "color":"black",
                  "style":{  
                     "fontSize":"8px"
                  }
               }
            },
            "bar":{  
               "colorByPoint":true,
               "dataLabels":{  
                  "enabled":true,
                  "color":"black",
                  "style":{  
                     "fontSize":"8px"
                  }
               }
            },
            "spline":{  
               "dataLabels":{  
                  "enabled":true,
                  "color":"black",
                  "style":{  
                     "fontSize":"8px"
                  }
               }
            }
         },
         "exporting":{  
            "enabled":false
         },
         "yAxis":[  
            {  
               "labels":{  
                  "style":{  
                     "color":"#89A54E"
                  }
               },
               "title":{  
                  "text":"SUM(AccountCodeAlternateKey)",
                  "events":{  

                  }
               },
               "opposite":false,
               "showEmpty":false
            }
         ],
         "tooltip":{  
            "headerFormat":"<b>{point.key}</b><br/>",
            "pointFormat":"{series.name}: {point.y}<br/>"
         }
      },
      "title":{  
         "text":"test_drilldown_col"
      },
      "xAxis":{  
         "labels":{  
            "useHTML":true,
            "rotation":-90
         },
         "categories":[  
            "null",
            "Assets",
            "Balances",
            "Expenditures",
            "Flow",
            "Liabilities",
            "Revenue",
            "Statistical"
         ],
         "crosshair":true,
         "useHTML":true,
         "lineColor":"transparent",
         "tickLength":0,
         "title":{  
            "text":"AccountType",
            "events":{  

            }
         }
      },
      "yAxis":{  

      },
      "drilldown":{  
         "series":[  
            {  
               "id":"Assets",
               "data":[  
                  [  
                     "abc",
                     4
                  ],
                  [  
                     "xyz",
                     2
                  ]
               ]
            },
            {  
               "id":"Flow",
               "data":[  
                  [  
                     "Apples",
                     4
                  ],
                  [  
                     "Oranges",
                     2
                  ]
               ]
            },
            {  
               "id":"Balances",
               "data":[  
                  [  
                     "Toyota",
                     4
                  ],
                  [  
                     "Opel",
                     2
                  ]
               ]
            }
         ]
      },
      "plotOptions":{  
         "line":{  
            "dataLabels":{  
               "enabled":true,
               "color":"black",
               "style":{  
                  "fontSize":"8px"
               }
            },
            "series":{  
               "color":"#FFFFFFF"
            }
         },
         "column":{  
            "colorByPoint":true,
            "dataLabels":{  
               "enabled":true,
               "color":"black",
               "style":{  
                  "fontSize":"8px"
               }
            }
         },
         "area":{  
            "dataLabels":{  
               "enabled":true,
               "color":"black",
               "style":{  
                  "fontSize":"8px"
               }
            }
         },
         "bar":{  
            "colorByPoint":true,
            "dataLabels":{  
               "enabled":true,
               "color":"black",
               "style":{  
                  "fontSize":"8px"
               }
            }
         },
         "spline":{  
            "dataLabels":{  
               "enabled":true,
               "color":"black",
               "style":{  
                  "fontSize":"8px"
               }
            }
         }
      },
      "loading":false,
      "series":[  
         {  
            "name":"SUM(AccountCodeAlternateKey)",
            "data":[  
               {  
                  "name":"Assets",
                  "y":23867,
                  "drilldown":"Assets"
               },
               {  
                  "name":"Balances",
                  "y":28580,
                  "drilldown":"Balances"
               },
               {  
                  "name":"Flow",
                  "y":191730,
                  "drilldown":"Flow"
               }
            ],
            "color":"#E3E75B"
         }
      ]
   }
] }

Это мой динамически сгенерированный json с ответом от API. Выполнены изменения в файле highcharts-ng.js для поддержки детализации. Для этого выполните Highcharts-ng с разверткой Но все же детализация не работает. Пожалуйста, предложите, какие изменения еще нужно сделать.

And my $scope.chartOptions have multiple charts data also

Заполнитель

...