Skip to content

Commit 5ab2489

Browse files
committed
fix ui for selected pie
1 parent bfb679e commit 5ab2489

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

scripts/chart/chart-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function donutChart() {
122122

123123
// add tooltip (svg circle element) when mouse enters label or slice
124124
selection.on('mouseenter', function (data) {
125-
125+
d3.selectAll('.toolCircle').remove();
126126
svg.append('text')
127127
.attr('class', 'toolCircle')
128128
.attr('dy', -15) // hard-coded. can adjust this to adjust text vertical alignment in tooltip

scripts/webact.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,10 @@ function setActiveTooltipe(currentTab) {
237237
if (element !== null) {
238238
var event = new Event("mouseenter");
239239
document.getElementById(currentTab).dispatchEvent(event);
240-
} else {
241-
var currentInfoForTab;
242-
if (currentTypeOfList === TypeListEnum.ToDay) {
243-
currentInfoForTab = targetTabs.find(x => x.url === currentTab).days.find(x => x.date === today)
244-
donut.viewToolTipe({
245-
'url': currentTab,
246-
'summary': currentInfoForTab.summary,
247-
'percentage': getPercentageForChart(currentInfoForTab.summary)
248-
});
249-
}
250240
}
241+
// var currentInfoForTab;
242+
// if (currentTypeOfList === TypeListEnum.ToDay) {
243+
// currentInfoForTab = targetTabs.find(x => x.url === currentTab).days.find(x => x.date === today)
244+
// }
251245
}
252246
}

style/webact.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ hr {
6767

6868
::-webkit-scrollbar-track
6969
{
70-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
7170
border-radius: 10px;
7271
background-color: #F5F5F5;
7372
}
@@ -81,7 +80,6 @@ hr {
8180
::-webkit-scrollbar-thumb
8281
{
8382
border-radius: 10px;
84-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
8583
background-color: #555;
8684
}
8785

0 commit comments

Comments
 (0)