Skip to content

Commit 94cbc06

Browse files
committed
chore(version): bump to v0.7.1
1 parent 1a65d19 commit 94cbc06

9 files changed

+36
-14
lines changed

.bmp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: 0.7.0
2+
version: 0.7.1
33
commit: 'chore(version): bump to v%.%.%'
44
files:
55
src/core.js: 'version: "%.%.%"'

c3.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @license C3.js v0.7.0 | (c) C3 Team and other contributors | http://c3js.org/ */
1+
/* @license C3.js v0.7.1 | (c) C3 Team and other contributors | http://c3js.org/ */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
44
typeof define === 'function' && define.amd ? define(factory) :
@@ -1161,7 +1161,7 @@
11611161
};
11621162

11631163
var c3 = {
1164-
version: "0.7.0",
1164+
version: "0.7.1",
11651165
chart: {
11661166
fn: Chart.prototype,
11671167
internal: {
@@ -6360,6 +6360,7 @@
63606360
tooltip_format_title: undefined,
63616361
tooltip_format_name: undefined,
63626362
tooltip_format_value: undefined,
6363+
tooltip_horizontal: undefined,
63636364
tooltip_position: undefined,
63646365
tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
63656366
return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';
@@ -7158,7 +7159,7 @@
71587159
values.filter(function (v) {
71597160
return v && !$$.isBarType(v.id);
71607161
}).forEach(function (v) {
7161-
var d = $$.dist(v, pos);
7162+
var d = $$.config.tooltip_horizontal ? $$.horizontalDistance(v, pos) : $$.dist(v, pos);
71627163

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

7182+
ChartInternal.prototype.horizontalDistance = function (data, pos) {
7183+
var $$ = this,
7184+
config = $$.config,
7185+
xIndex = config.axis_rotated ? 1 : 0,
7186+
x = $$.x(data.x);
7187+
return Math.abs(x - pos[xIndex]);
7188+
};
7189+
71817190
ChartInternal.prototype.convertValuesToStep = function (values) {
71827191
var converted = [].concat(values),
71837192
i;

c3.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

component.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "c3",
33
"repo": "masayuki0812/c3",
44
"description": "A D3-based reusable chart library",
5-
"version": "0.7.0",
5+
"version": "0.7.1",
66
"keywords": [],
77
"dependencies": {
88
"mbostock/d3": "v5.0.0"

docs/index.html.haml

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838

3939
%h3 Change Log
4040
%ul
41+
%li
42+
<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>
43+
%ul
44+
%li Add an option for tooltip behavior.
4145
%li
4246
<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>
4347
%ul

docs/js/c3.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @license C3.js v0.7.0 | (c) C3 Team and other contributors | http://c3js.org/ */
1+
/* @license C3.js v0.7.1 | (c) C3 Team and other contributors | http://c3js.org/ */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
44
typeof define === 'function' && define.amd ? define(factory) :
@@ -1161,7 +1161,7 @@
11611161
};
11621162

11631163
var c3 = {
1164-
version: "0.7.0",
1164+
version: "0.7.1",
11651165
chart: {
11661166
fn: Chart.prototype,
11671167
internal: {
@@ -6360,6 +6360,7 @@
63606360
tooltip_format_title: undefined,
63616361
tooltip_format_name: undefined,
63626362
tooltip_format_value: undefined,
6363+
tooltip_horizontal: undefined,
63636364
tooltip_position: undefined,
63646365
tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
63656366
return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';
@@ -7158,7 +7159,7 @@
71587159
values.filter(function (v) {
71597160
return v && !$$.isBarType(v.id);
71607161
}).forEach(function (v) {
7161-
var d = $$.dist(v, pos);
7162+
var d = $$.config.tooltip_horizontal ? $$.horizontalDistance(v, pos) : $$.dist(v, pos);
71627163

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

7182+
ChartInternal.prototype.horizontalDistance = function (data, pos) {
7183+
var $$ = this,
7184+
config = $$.config,
7185+
xIndex = config.axis_rotated ? 1 : 0,
7186+
x = $$.x(data.x);
7187+
return Math.abs(x - pos[xIndex]);
7188+
};
7189+
71817190
ChartInternal.prototype.convertValuesToStep = function (values) {
71827191
var converted = [].concat(values),
71837192
i;

docs/js/c3.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "c3",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "D3-based reusable chart library",
55
"main": "c3.js",
66
"files": [

src/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
} from './util';
2121

2222
var c3 = {
23-
version: "0.7.0",
23+
version: "0.7.1",
2424
chart: {
2525
fn: Chart.prototype,
2626
internal: {

0 commit comments

Comments
 (0)