This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react' | |
import { G, Line, Path, Rect, Text } from 'react-native-svg' | |
import * as d3scale from 'd3-scale' | |
import { dateToShortString } from '../utils' | |
export default class Axis extends Component { | |
static propTypes = { | |
width: PropTypes.number.isRequired, | |
ticks: PropTypes.number.isRequired, | |
x: PropTypes.number, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An implementation of Jenkins's one-at-a-time hash | |
// <http://en.wikipedia.org/wiki/Jenkins_hash_function> | |
// key: string | |
// return hex | |
function oneAtATimeHash(key) { | |
var hash = 0, i = key.length; | |
while (i--) { | |
hash += key.charCodeAt(i); | |
hash += (hash << 10); | |
hash ^= (hash >> 6); |
OlderNewer