Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Chart Axis Label Events

  1. #11
    Sencha User
    Join Date
    Aug 2017
    Posts
    9

    Default

    Thanks! Will try to use them and get back if it does what I want.

  2. #12
    Sencha User
    Join Date
    Aug 2017
    Posts
    9

    Default

    Quote Originally Posted by hakimio View Post
    There is nothing firing "click" event in the label class, so of course your handler will never be called.
    You might want to try to handle itemmouseup (requires ItemEvents plugin) or spritemouseup events on the cartesian chart itself instead.
    I tried using both, but I can't seem to use it on axis labels since itemsmouseup only applies to series and spritemouseup is for sprites (which does not work on my test). No available option for axis labels.

    Code:
    {
      xtype: 'cartesian',
      sprites: [{
        type: 'circle',
        fillstyle: '#79BB3F',
        r: 100,
        x: 100,
        y: 100
      }],
      plugins: [{
        ptype: 'chartitemevents',
        moveEvents: true
      }],
      listeners: [{
        spritemouseover: function() {
          // does not fire on added sprite?
        },
        itemclick: function() {
          // only fires on series
        },
        spriteclick: function() {
          // does not fire on added sprite?
        },
        spritemouseup: function() {
          // does not fire on added sprite?
        }
      }]
    }
    BTW, I used the suggestion/code specified here and it solves my problem but is not 100% accurate when other configs for the label has been added like rotation. Will there be any possible non-hack solution for this?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. chart Axis label rotation
    By niravdhami in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 23 Mar 2017, 11:01 AM
  2. How can i add a label for x-axis and y-axis for a chart?
    By madhu_g in forum Ext GWT: Discussion
    Replies: 7
    Last Post: 7 Jul 2014, 11:31 PM
  3. Replies: 4
    Last Post: 11 Sep 2013, 4:18 PM
  4. Replies: 4
    Last Post: 9 Jan 2013, 2:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •