2013-06-20 3 views
0

я "м с помощью плагина„flotr2“, чтобы отобразить линейную диаграмму в моем приложенииflotr2 - парить на линии в линейной диаграмме

Я должен отобразить всплывающую подсказку, когда я парить на точки и другую всплывающую подсказку, когда я парить на. линия.

Я использую в параметре «дорожки» в поле «мышей» в настройках. я увидел там anoter параметр вызова «trackAll». это не было хорошо для меня, еще потому, что показать все то время, всплывающая подсказка, а не только когда я был на линии.

вот мой код:

dataArray.push({ 
     data: createDataObject(data), 
     lines: { 
      fill: true, 
      show: true, 
      fillOpacity: 0.1 
     }, 
     points: { 
      show: true, 
      fillOpacity: '0', 
      radius: 2, 
      lineWidth: 2 
     }, 
     mouse: { 
      data: data, 
      track: true, 
      position: 'n', 
      relative: true, 
      trackFormatter: function (obj) {      
       return setTooltipData(data, obj);      
      }, // => formats the values in the value box 
      margin: 7, // => margin in pixels of the valuebox 
      lineColor: '#FFFFFFFF', // => line color of points that are drawn when mouse comes near a value of a series 
      trackDecimals: 1, // => decimals for the track values 
      sensibility: 3, // => the lower this number, the more precise you have to aim to show a value //hover area 
      trackY: true, // => whether or not to track the mouse in the y axis 
      radius: 2, // => radius of the track point 
      lineWidth: 2, 
      fillColor: null, // => color to fill our select bar with only applies to bar and similar graphs (only bars for now) 
      fillOpacity: 1 // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill 
     } 
    }); 

ответ

0

Попробуйте установить «дорожка:! 0, trackAll:! 1» на мышь.

Смежные вопросы