victory-chart
Advanced tools
Comparing version 13.0.1 to 13.0.2
# VictoryChart Changelog | ||
## 13.0.2 (2016-10-19) | ||
- Fix date bug in `VictoryGroup` | ||
- Ensure axis ticks always exist | ||
## 13.0.1 (2016-10-18) | ||
@@ -4,0 +9,0 @@ |
@@ -23,3 +23,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _without2=require("lodash/without");var _without3=_interopRequireDefault(_without2);var _range2=require("lodash/range");var _range3=_interopRequireDefault(_range2);var _isFunction2=require("lodash/isFunction");var _isFunction3=_interopRequireDefault(_isFunction2);var _defaultsDeep2=require("lodash/defaultsDeep");var _defaultsDeep3=_interopRequireDefault(_defaultsDeep2);var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _includes2=require("lodash/includes");var _includes3=_interopRequireDefault(_includes2); | ||
domain=props.domain[inherentAxis]; | ||
}else if(props.tickValues){ | ||
}else if(Array.isArray(props.tickValues)&&props.tickValues.length>1){ | ||
domain=_victoryCore.Domain.getDomainFromTickValues(props); | ||
@@ -270,5 +270,6 @@ } | ||
} | ||
return props.tickValues; | ||
return props.tickValues.length?props.tickValues:scale.domain(); | ||
}else if(scale.ticks&&(0,_isFunction3.default)(scale.ticks)){ | ||
var ticks=scale.ticks(props.tickCount); | ||
var scaleTicks=scale.ticks(props.tickCount); | ||
var ticks=Array.isArray(scaleTicks)&&scaleTicks.length?scaleTicks:scale.domain(); | ||
if(props.crossAxis){ | ||
@@ -275,0 +276,0 @@ return(0,_includes3.default)(ticks,0)?(0,_without3.default)(ticks,0):ticks; |
@@ -234,3 +234,4 @@ Object.defineProperty(exports,"__esModule",{value:true});var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _assign2=require("lodash/assign");var _assign3=_interopRequireDefault(_assign2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}(); | ||
return dataset.map(function(datum){ | ||
return(0,_assign3.default)({},datum,{x1:datum.x+xOffset}); | ||
var x1=datum.x instanceof Date?new Date(datum.x+xOffset):datum.x+xOffset; | ||
return(0,_assign3.default)({},datum,{x1:x1}); | ||
}); | ||
@@ -237,0 +238,0 @@ }},{key:"getNewChildren",value:function getNewChildren( |
{ | ||
"name": "victory-chart", | ||
"version": "13.0.1", | ||
"version": "13.0.2", | ||
"description": "Chart Component for Victory", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -23,3 +23,3 @@ import { includes, defaults, defaultsDeep, isFunction, range, without } from "lodash"; | ||
domain = props.domain[inherentAxis]; | ||
} else if (props.tickValues) { | ||
} else if (Array.isArray(props.tickValues) && props.tickValues.length > 1) { | ||
domain = Domain.getDomainFromTickValues(props); | ||
@@ -270,5 +270,6 @@ } | ||
} | ||
return props.tickValues; | ||
return props.tickValues.length ? props.tickValues : scale.domain(); | ||
} else if (scale.ticks && isFunction(scale.ticks)) { | ||
const ticks = scale.ticks(props.tickCount); | ||
const scaleTicks = scale.ticks(props.tickCount); | ||
const ticks = Array.isArray(scaleTicks) && scaleTicks.length ? scaleTicks : scale.domain(); | ||
if (props.crossAxis) { | ||
@@ -275,0 +276,0 @@ return includes(ticks, 0) ? without(ticks, 0) : ticks; |
@@ -234,3 +234,4 @@ import { assign, defaults } from "lodash"; | ||
return dataset.map((datum) => { | ||
return assign({}, datum, {x1: datum.x + xOffset}); | ||
const x1 = datum.x instanceof Date ? new Date(datum.x + xOffset) : datum.x + xOffset; | ||
return assign({}, datum, {x1}); | ||
}); | ||
@@ -237,0 +238,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1717586
32763
3