0

I recently updated Rgraph in my Appcelerator project, and I got a problem: the onclick function does not work. Here is a sample code:

head:

    <pre class="code">
        
        <script src="rgraph/RGraph.svg.common.core.js"></script>            
        <script src="rgraph/RGraph.svg.common.tooltips.js"></script>
        <script src="rgraph/RGraph.svg.pie.js"></script>                  
    </pre>    

end head

<body>
           
     <div style="width: 700px; height: 350px; border: 1px solid #ddd" id="chart-container"> </div>
    <script>
        Ti.API.info('test 1 '); 
    </script>

     <script>
                    
      var torta = new RGraph.SVG.Pie({
            id: 'chart-container',
            data: [70,30],              
            options: {                  
                labels: ['first', 'second'],
                tooltips: ['tool0','tool1'],                    
                shadow: true,
                exploded: [0,25],
                colors: ['red','yellow']                    
            }
       }).on('click', function (e, shape){
                
            Ti.API.info('test 2');
            
        });
        
        torta.roundRobin();
        
    
    </script>
</body>

The tooltips show up regulary, and I can see "test 1" in the console when the chart is drawed, but I can't see "test 2" when I click the chart. I'm testing it with the iPad 8 emulator, with ios 14 and Titanium sdk 9.2.2. Can anyone help me? Thanks

BorGhO
  • 3
  • 3
  • #what about on a real mobile - not an emulator? – Richard Nov 10 '20 at 12:40
  • On a real device, iPad Air 2, I can't see the chart at all :( I tried to use the canvas version, but it doesn't show up aswell – BorGhO Nov 10 '20 at 16:35
  • Odd. How about the demo pages from the zip archive? – Richard Nov 11 '20 at 17:23
  • I tried with "svg-pie-effect-roundrobin", I can see the paragraphs but not the chart. Maybe there is something I should set up in Appcelerator? With version 2.0 of Rgraph everything was working. – BorGhO Nov 13 '20 at 10:14
  • Version 2? That's *really* old. I'm afraid I don't know anything about AppCelerator. The mobile testing that I do doesn't use any extra libraries and the chart demos all work fine. – Richard Nov 13 '20 at 21:47
  • Ok, thanks anyway man – BorGhO Nov 16 '20 at 12:56

0 Answers0