Coder Social home page Coder Social logo

Comments (3)

GuusPunt avatar GuusPunt commented on June 12, 2024

lineshowvalues_true

I have enabled the showValues value on the line series. Now the values of the line are drawn in the chart, but the line is not visible.

from angularjs-fusioncharts.

rousan avatar rousan commented on June 12, 2024

Hi @GuusPunt,

Can you provide samples code to produce the same at our end?

from angularjs-fusioncharts.

GuusPunt avatar GuusPunt commented on June 12, 2024

Hi @rousan .

I'm quite new to github, in which form would be the best to provide the sample code?

PS:
The charts draw perfect when i start an timer in the angularjs controller init function instead of calling a service and setting the response instant to the datasource of the chart. My problems is kind of solved but im still wondering what causes the difference between the two differents approaches as shown below.

---- Line not drawn, bars drawn ----

function initController() {
        CashflowService.GetCurrentRateChart('2018')
        .then(function(result){
          if(result.success){
            vm.currentRateChart.dataset[0].data     = result.incoming;
            vm.currentRateChart.dataset[1].data     = result.outgoing;
            vm.currentRateChart.dataset[2].data     = result.cashisking;
          }
        });
    }

---- Perfectly working example ----

    function initController() {
        startUpdatingCharts();
    }

   var updateCharts;
   function startUpdatingCharts (){
    updateCharts = $interval(function() {
        updateCurrentRate();
    }, 1000);
   }

   $scope.stopUpdatingCharts = function() {
    if (angular.isDefined(updateCharts)) {
        $interval.cancel(updateCharts);
        updateCharts = undefined;
    }
   };

   $scope.$on('$destroy', function() {
    // Make sure that the interval is destroyed too
    $scope.stopUpdatingCharts();
   });

function updateCurrentRate(){
    console.log("updating current rate chart");
    CashflowService.GetCurrentRateChart('2018')
    .then(function(result){
      if(result.success){
        vm.currentRateChart.dataset[0].data     = result.incoming;
        vm.currentRateChart.dataset[1].data     = result.outgoing;
        vm.currentRateChart.dataset[2].data     = result.cashisking;
      }
    });
  }

from angularjs-fusioncharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.