angularjs - highcharts-ng model data not working -


I am trying to populate several charts with data in .json file. I have a chart that works with some dummy / link coded values ​​(commented on plunker), but when I want to add value to a .json file / model it does not work.

HTML Template:

  & lt; Highcharct = "chartConfig" & gt; & Lt; / Highchart & gt;  

Controller:

  series: [[Data: ['part.before_hp', 'part.before_torque'], // It does not work / / Data: [2,3], // This dataLabels works: {Enabled: True, Color: '#FFFFFF', Y: 40, Style: {fONTSIZE: '24px', FontFamily: 'TG, sans- Serif ', textShadow:' 0 0 3px black '}}, BorderColor:' Transparent ', pointPadding: 0.03} {data: [' part.after_hp ',' part.after_torque '], // This // data does not work [5,6], // This dataLabels works: {Enabled: True, Color: '#FFFFFF', Y: 40, Style: {fONTSIZE: '24px', FontFamily: 'TG, sans-serif' , TextShadow: '0 0 3px black'}}, border color: 'transparent', point padding: 0.03}],  

I And in this are trying for days to Kashmir, to fix it, if someone could help me I'd appreciate it.

I have shown that what I am doing.

P>

OK, I understood it. Here's an update - actually in the hope that it will help someone else.

Actually I have added an 'Update'; Functions that when any part of the buttons are clicked or are on the int, which passes the current part and configures the chart option with it.

Button to select parts:

  & lt; Button class = "btn btn-info" ng-click = "selectLevel2 ($ index); car.parts.selected = part.id; update (part);" Ng-class = "{selected: $ index == parts selected}" & gt; {{Part.name}} & lt; / Button & gt;  

NG-Init which will load the chart without user input:

  & lt; Div id = "{{part.id}}" ng-if = "car.parts.selected == part.id" class = "my-switch-animation" ng-init = "update (part);" & Gt; & Lt; Div ng-if = "car.parts.selected == part.id" ng-square = "{selected: $ index == part selected}" square = "jason" & gt; {{Part}} & lt; / Div & gt; & Lt; Highchurch Config = "chartConfig" & gt; & Lt; / Highchart & gt; & Lt; / Div & gt;  

You can see the update function in the plunker code, I do not want to post too much chaos: -)


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -