(div, data, Plottable)
| 13 | } |
| 14 | |
| 15 | function run(div, data, Plottable) { |
| 16 | "use strict"; |
| 17 | |
| 18 | var xScale = new Plottable.Scales.ModifiedLog(); |
| 19 | var yScale = new Plottable.Scales.ModifiedLog(); |
| 20 | var xAxis = new Plottable.Axes.Numeric(xScale, "bottom"); |
| 21 | var yAxis = new Plottable.Axes.Numeric(yScale, "left"); |
| 22 | |
| 23 | var plot = new Plottable.Plots.Scatter() |
| 24 | .renderer("svg") |
| 25 | .deferredRendering(true) |
| 26 | .addDataset(new Plottable.Dataset(data)) |
| 27 | .labelsEnabled(true) |
| 28 | .x((d) => d.x, xScale) |
| 29 | .y((d) => d.y, yScale); |
| 30 | |
| 31 | var table = new Plottable.Components.Table([ |
| 32 | [yAxis, plot], |
| 33 | [null, xAxis] |
| 34 | ]); |
| 35 | |
| 36 | var panZoom = new Plottable.Interactions.PanZoom(xScale, yScale).attachTo(plot); |
| 37 | |
| 38 | table.renderTo(div); |
| 39 | |
| 40 | panZoom.setMinMaxDomainValuesTo(xScale); |
| 41 | panZoom.setMinMaxDomainValuesTo(yScale); |
| 42 | } |
nothing calls this directly
no test coverage detected