Socket
Socket
Sign inDemoInstall

ember-nf-graph

Package Overview
Dependencies
187
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-beta.26 to 1.0.0-beta.27

50

addon/mixins/graph-graphic-with-tracking-dot.js

@@ -46,2 +46,39 @@ import Ember from 'ember';

/**
The value of the data that is being tracked by the component.
@property trackedData
@type {Object} an object with the following values:
- point: an { x, y } pair for the exact px coordinates inside the graph-content
- graphX: domain x value at mouse position
- graphY: domain y value at mouse position
- x: nearest x data value
- y: nearest y data value
- data: nearest raw data
- renderX: domain x value to render a tracking dot at (stacked areas are offset)
- renderY: domain x value to render a tracking dot at (stacked areas are offset)
- mouseX: mouse x position in pixels
- mouseY: mouse y position in pixels
@default null
*/
trackedData: null,
/**
The value of the data that is being tracked by the component, ONLY if the
graph-content is currently being hovered.
@property hoverData
@type {Object} an object with the following values:
- point: an { x, y } pair for the exact px coordinates inside the graph-content
- graphX: domain x value at mouse position
- graphY: domain y value at mouse position
- x: nearest x data value
- y: nearest y data value
- data: nearest raw data
- renderX: domain x value to render a tracking dot at (stacked areas are offset)
- renderY: domain x value to render a tracking dot at (stacked areas are offset)
- mouseX: mouse x position in pixels
- mouseY: mouse y position in pixels
@default null
*/
hoverData: null,
_showTrackingDot: true,

@@ -68,11 +105,14 @@

didTrack action.
@method _sendDidTrack
@method _trackedDataChanged
@private
*/
_sendDidTrack: Ember.observer('trackedData', function(){
_trackedDataChanged: Ember.observer('trackedData', function(){
var trackedData = this.get('trackedData');
this.set('hoverData', this._hovered ? trackedData : null);
if(this.get('didTrack')) {
this.sendAction('didTrack', {
x: this.get('trackedData.x'),
y: this.get('trackedData.y'),
data: this.get('trackedData.data'),
x: trackedData.x,
y: trackedData.y,
data: trackedData.data,
source: this,

@@ -79,0 +119,0 @@ graph: this.get('graph'),

# Changelog
### 1.0.0-beta.27
- UPDATE Readd `hoverData` output to tracked components.
### 1.0.0-beta.26

@@ -4,0 +8,0 @@

2

package.json
{
"name": "ember-nf-graph",
"version": "1.0.0-beta.26",
"version": "1.0.0-beta.27",
"description": "A graphing/charting DSL for Ember.js",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc