Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Vote Rating
    0
    sulakshana1782 is on a distinguished road

      0  

    Default Unanswered: line chart with an image

    Unanswered: line chart with an image


    Hi

    I have this line chart, which animates. i.e. the line slides from top to bottom direction. I have used the animate attribute for the same, here is the code
    Code:
     animate: {
                  duration: 500,
                  delay: 200,
                  easing: 'easeIn' ,
                  smooth: true,
                  from: {
                     height: 2000
                     } ,
                  to: {
                      height: 0
                  }
        }
    Now. I have an image that I want to link with this line chart. so that when the line chart slides the image also slides with it. How do I achieve that?

    Any help is appreciated. Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can show it outside of the chart but above it.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Vote Rating
    0
    sulakshana1782 is on a distinguished road

      0  

    Default


    I think this can be done by adding adding an image and a chart to a 'ext.draw.Component' and animating the component. It works for me when I add an image and a text field...the code is as shown below

    Code:
    
    var dc = new Ext.draw.Component({
            width: 100,
            height: 100,
            padding: 0,
    		renderTo: Ext.getBody(),
         //   cls: 'cursor-dragme',
          //  constrain: true,
            draggable: true,
            floating: true,
            items: [{
    			type: 'image',
    			x: 0,
    			y: 0,
    			width: 50,
    			height: 50,
    			src: 'https://lh3.googleusercontent.com/-ebWijDUUvbw/T1g2Svf0qFI/AAAAAAAAA-A/8aPzVbKtz40/s44/avgspen'
     	},
    		{
    				type: 'text',
    				text: '$50',
    				x: 50,
    				y: 25,
    				fill: '#000',
    				font: '18px Arial',
    				rotate: {
    					degrees: 45
    				}
    			}
    		]
        }); 
    
    dc.getEl().animate({...});
    But I want to add a line chart to the component. Could you please provide me an example of adding a line chart to an 'Ext.draw.Component'?

    Thanks in advance.

Thread Participants: 1

Tags for this Thread