Commit db25935a authored by David Anderson's avatar David Anderson
Browse files

getData at event now offsets coordinates by margin

parent af867d0a
......@@ -31,6 +31,7 @@ export class ScatterChartDemoComponent {
const pointCount = 20;
let baseChart = new ScatterChart();
baseChart.margin = 15;
let selectionChart = new ScatterChart();
// selectionChart.debugLogger.isEnabled = true;
......
......@@ -41,11 +41,11 @@ export class GetDataAtMouseEvent extends GistBehavior {
me.eventHandlers.forEach( ( eh ) => {
reportList = [];
makeList( eh.chart )
makeList<BaseChart>( eh.chart as BaseChart )
.filter( chart => chart !== undefined && chart.isActive )
.forEach( chart => {
reportList.push( {
dpl: chart._implementation.getDataAtCoord( me.currentX, me.currentY, me.closeEnough ),
dpl: chart._implementation.getDataAtCoord( me.currentX +chart.margin, me.currentY + chart.margin, me.closeEnough ),
chart: chart
} );
} );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
export declare function makeList(x: any | Array<any>): Array<any>;
export declare function makeList<T = any>(x: T | Array<T>): Array<T>;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment