Hi!
I using Qt 5.4.1 Enterprise and used Qt Charts 2.0 module
I create Line Chart Example and build it to android device
My code:
Qt Code:
  1. import QtQuick 2.4
  2. import QtQuick.Controls 1.3
  3. import QtQuick.Window 2.2
  4. import QtQuick.Dialogs 1.2
  5. import QtCharts 2.0
  6.  
  7. ApplicationWindow {
  8. width: 640
  9. height: 480
  10. visible: true
  11. property int currentIndex: -1
  12. property int index_X: -1
  13. property int index_Y: 50
  14. property string driver: "Test"
  15.  
  16. ChartView {
  17. id: chartView
  18. title: "TEST CHARTS"
  19. anchors.fill: parent
  20. legend.alignment: Qt.AlignTop
  21. animationOptions: ChartView.SeriesAnimations
  22. antialiasing: true
  23. theme: ChartView.ChartThemeDark
  24. }
  25.  
  26. Timer {
  27. id: timer
  28. interval: 700
  29. repeat: true
  30. triggeredOnStart: true
  31. running: true
  32. onTriggered: {
  33. currentIndex++;
  34. index_Y = Math.random()*250
  35. index_X ++;
  36. if (currentIndex <= 20) {
  37. // Check if there is a series for the data already (we are using driver name to identify series)
  38. var lineSeries = chartView.series(driver);
  39. if (!lineSeries) {
  40. lineSeries = chartView.createSeries(ChartView.SeriesTypeLine, driver);
  41. chartView.axisY().min = 0;
  42. chartView.axisY().max = 250;
  43. chartView.axisY().tickCount = 6;
  44. chartView.axisX().titleText = "Time line";
  45. chartView.axisX().labelFormat = "%.0f";
  46. }
  47. lineSeries.append(index_X, index_Y);
  48.  
  49. if (index_X > 3) {
  50. chartView.axisX().max = index_X + 1;
  51. chartView.axisX().min = chartView.axisX().max - 5;
  52. } else {
  53. chartView.axisX().max = 5;
  54. chartView.axisX().min = 0;
  55. }
  56. chartView.axisX().tickCount = chartView.axisX().max - chartView.axisX().min + 1;
  57. } else {
  58. // No more data, change x-axis range to show all the data
  59. timer.stop();
  60. chartView.animationOptions = ChartView.AllAnimations;
  61. chartView.axisX().min = 0;
  62. chartView.axisX().max = index_X;
  63. }
  64. }
  65. }
  66.  
  67. }
To copy to clipboard, switch view to plain text mode 
And now, I want to zoom charts using two finger as video below (from 1.59 - 2.02)

Please help me any idea. Thanks so much!