How to use mapd-data-layer-2 - 1 common examples

To help you get started, we’ve selected a few mapd-data-layer-2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github omnisci / mapd-charting / src / utils / utils.js View on Github external
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

mapd-data-layer-2

SQL data-layer for the MapD frontend

Apache-2.0
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Popular mapd-data-layer-2 functions

Similar packages