Commit 7ab99c50 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Modify tooltip.enabled to tooltip.show

parent 12619fdc
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
var __regions = getConfig(['regions'], []); var __regions = getConfig(['regions'], []);
// tooltip - show when mouseover on each data // tooltip - show when mouseover on each data
var __tooltip_enabled = getConfig(['tooltip', 'enabled'], true), var __tooltip_show = getConfig(['tooltip', 'show'], true),
__tooltip_format_title = getConfig(['tooltip', 'format', 'title'], null), __tooltip_format_title = getConfig(['tooltip', 'format', 'title'], null),
__tooltip_format_value = getConfig(['tooltip', 'format', 'value'], null), __tooltip_format_value = getConfig(['tooltip', 'format', 'value'], null),
__tooltip_contents = getConfig(['tooltip', 'contents'], function (d, defaultTitleFormat, defaultValueFormat, color) { __tooltip_contents = getConfig(['tooltip', 'contents'], function (d, defaultTitleFormat, defaultValueFormat, color) {
...@@ -1123,7 +1123,7 @@ ...@@ -1123,7 +1123,7 @@
var tWidth, tHeight; var tWidth, tHeight;
var svgLeft, tooltipLeft, tooltipRight, tooltipTop, chartRight; var svgLeft, tooltipLeft, tooltipRight, tooltipTop, chartRight;
var dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); }); var dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); });
if (! __tooltip_enabled) { return; } if (! __tooltip_show) { return; }
// don't show tooltip when no data // don't show tooltip when no data
if (dataToShow.length === 0) { return; } if (dataToShow.length === 0) { return; }
// Construct tooltip // Construct tooltip
...@@ -1166,7 +1166,7 @@ ...@@ -1166,7 +1166,7 @@
function showXGridFocus(selectedData) { function showXGridFocus(selectedData) {
var dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); }); var dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); });
if (! __tooltip_enabled) { return; } if (! __tooltip_show) { return; }
// Hide when scatter plot exists // Hide when scatter plot exists
if (hasScatterType(c3.data.targets) || hasArcType(c3.data.targets)) { return; } if (hasScatterType(c3.data.targets) || hasArcType(c3.data.targets)) { return; }
main.selectAll('line.xgrid-focus') main.selectAll('line.xgrid-focus')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment