Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { createParser } from "mapd-data-layer-2"
import { formatDataValue, maybeFormatInfinity } from "./formatting-helpers"
import { DAYS, HOURS, MONTHS, QUARTERS } from "../constants/dates-and-times"
import deepEqual from "fast-deep-equal"
import d3 from "d3"
import { constants } from "../core/core"
export const parser = createParser()
function hexBinSQL(sql, { width, height, mark, x, y, aggregate }, parser) {
const hexoffsetx = 0
const hexoffsety = 0
const heximgwidth = width
const heximgheight = height
let hexminmercx = x.domain[0]
let hexmaxmercx = x.domain[1]
let hexminmercy = y.domain[0]
let hexmaxmercy = y.domain[1]
if (hexoffsetx) {
const mercxdiff = (hexoffsetx * (hexmaxmercx - hexminmercx)) / heximgwidth
hexminmercx = hexminmercx - mercxdiff