Skip to content

Commit

Permalink
chore(version): bump to v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed May 29, 2019
1 parent 1a65d19 commit 94cbc06
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bmp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 0.7.0
version: 0.7.1
commit: 'chore(version): bump to v%.%.%'
files:
src/core.js: 'version: "%.%.%"'
Expand Down
15 changes: 12 additions & 3 deletions c3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @license C3.js v0.7.0 | (c) C3 Team and other contributors | http://c3js.org/ */
/* @license C3.js v0.7.1 | (c) C3 Team and other contributors | http://c3js.org/ */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1161,7 +1161,7 @@
};

var c3 = {
version: "0.7.0",
version: "0.7.1",
chart: {
fn: Chart.prototype,
internal: {
Expand Down Expand Up @@ -6360,6 +6360,7 @@
tooltip_format_title: undefined,
tooltip_format_name: undefined,
tooltip_format_value: undefined,
tooltip_horizontal: undefined,
tooltip_position: undefined,
tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';
Expand Down Expand Up @@ -7158,7 +7159,7 @@
values.filter(function (v) {
return v && !$$.isBarType(v.id);
}).forEach(function (v) {
var d = $$.dist(v, pos);
var d = $$.config.tooltip_horizontal ? $$.horizontalDistance(v, pos) : $$.dist(v, pos);

if (d < minDist) {
minDist = d;
Expand All @@ -7178,6 +7179,14 @@
return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));
};

ChartInternal.prototype.horizontalDistance = function (data, pos) {
var $$ = this,
config = $$.config,
xIndex = config.axis_rotated ? 1 : 0,
x = $$.x(data.x);
return Math.abs(x - pos[xIndex]);
};

ChartInternal.prototype.convertValuesToStep = function (values) {
var converted = [].concat(values),
i;
Expand Down
4 changes: 2 additions & 2 deletions c3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "c3",
"repo": "masayuki0812/c3",
"description": "A D3-based reusable chart library",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [],
"dependencies": {
"mbostock/d3": "v5.0.0"
Expand Down
4 changes: 4 additions & 0 deletions docs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@

%h3 Change Log
%ul
%li
<a href="https://github.com/c3js/c3/releases/tag/v0.7.1">v0.7.1</a><span class="gray">&nbsp;-&nbsp;2019-05-29</span>
%ul
%li Add an option for tooltip behavior.
%li
<a href="https://github.com/c3js/c3/releases/tag/v0.7.0">v0.7.0</a><span class="gray">&nbsp;-&nbsp;2019-04-10</span>
%ul
Expand Down
15 changes: 12 additions & 3 deletions docs/js/c3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @license C3.js v0.7.0 | (c) C3 Team and other contributors | http://c3js.org/ */
/* @license C3.js v0.7.1 | (c) C3 Team and other contributors | http://c3js.org/ */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1161,7 +1161,7 @@
};

var c3 = {
version: "0.7.0",
version: "0.7.1",
chart: {
fn: Chart.prototype,
internal: {
Expand Down Expand Up @@ -6360,6 +6360,7 @@
tooltip_format_title: undefined,
tooltip_format_name: undefined,
tooltip_format_value: undefined,
tooltip_horizontal: undefined,
tooltip_position: undefined,
tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';
Expand Down Expand Up @@ -7158,7 +7159,7 @@
values.filter(function (v) {
return v && !$$.isBarType(v.id);
}).forEach(function (v) {
var d = $$.dist(v, pos);
var d = $$.config.tooltip_horizontal ? $$.horizontalDistance(v, pos) : $$.dist(v, pos);

if (d < minDist) {
minDist = d;
Expand All @@ -7178,6 +7179,14 @@
return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));
};

ChartInternal.prototype.horizontalDistance = function (data, pos) {
var $$ = this,
config = $$.config,
xIndex = config.axis_rotated ? 1 : 0,
x = $$.x(data.x);
return Math.abs(x - pos[xIndex]);
};

ChartInternal.prototype.convertValuesToStep = function (values) {
var converted = [].concat(values),
i;
Expand Down
4 changes: 2 additions & 2 deletions docs/js/c3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c3",
"version": "0.7.0",
"version": "0.7.1",
"description": "D3-based reusable chart library",
"main": "c3.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from './util';

var c3 = {
version: "0.7.0",
version: "0.7.1",
chart: {
fn: Chart.prototype,
internal: {
Expand Down

0 comments on commit 94cbc06

Please sign in to comment.