Code Monkey home page Code Monkey logo

Comments (7)

gevgeny avatar gevgeny commented on May 18, 2024

I really cannot understand the question.

from angular2-highcharts.

gevgeny avatar gevgeny commented on May 18, 2024

If you can fetch values in the event handler why you cannot assign them to a variable ?

from angular2-highcharts.

djrr94 avatar djrr94 commented on May 18, 2024

Sorry, my description maybe weren't so clear.

Maybe I'm doing something wrong, but in this updated plunk you can see that console logging with these variables works okay, but assigning these values to this.from and this.to model variables doesn't work.

xAxis: { events: { setExtremes: function (e) { this.from = Highcharts.dateFormat(null, e.min); // Doesn't work this.to = Highcharts.dateFormat(null, e.max); // Doesn't work console.log('min: ' + Highcharts.dateFormat(null, e.min) + ' max: ' + Highcharts.dateFormat(null, e.max)); // Works } } }

So I thought the correct way doing this is through your event emitters like (selection) in template, or I can really miss something.

from angular2-highcharts.

gevgeny avatar gevgeny commented on May 18, 2024

You are not changing properties of your component in your fiddle. see http://plnkr.co/edit/IXmgt9CcR15B3WbUizKr?p=preview

from angular2-highcharts.

djrr94 avatar djrr94 commented on May 18, 2024

Aww, I though I must miss something, thank you so much!

from angular2-highcharts.

gevgeny avatar gevgeny commented on May 18, 2024

Yes, you did. How function context works in JS ;) https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/this

from angular2-highcharts.

arjun289 avatar arjun289 commented on May 18, 2024

I am trying to access the rangeSelector button event inside my component using the (selection). But I am not able to do so if the button is pressed. http://plnkr.co/edit/OwcqjORHCB9pZHBrt4cm?p=preview. Do I need to export something from the event?

from angular2-highcharts.

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.