Skip to content

Commit 935354a

Browse files
committed
fix: improved border-color of events in timeline visualization
1 parent bba8b35 commit 935354a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/visualizations/VisTimeline.vue‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ div#visualization {
1616
}
1717
1818
.timeline-item {
19-
border-color: rgba(0, 0, 0, 0.075);
2019
border-radius: 2px;
2120
}
2221
}
@@ -26,6 +25,7 @@ div#visualization {
2625
<script lang="ts">
2726
import _ from 'lodash';
2827
import moment from 'moment';
28+
import Color from 'color';
2929
import { buildTooltip } from '../util/tooltip.js';
3030
import { getColorFromString, getTitleAttr } from '../util/color.js';
3131
@@ -97,14 +97,16 @@ export default {
9797
9898
// Build items
9999
const items = _.map(this.chartData, (row, i) => {
100+
const bgColor = row[5];
101+
const borderColor = Color(bgColor).darken(0.3);
100102
return {
101103
id: String(i),
102104
group: row[0],
103105
content: row[1],
104106
title: row[2],
105107
start: moment(row[3]),
106108
end: moment(row[4]),
107-
style: `background-color: ${row[5]}`,
109+
style: `background-color: ${bgColor}; border-color: ${borderColor}`,
108110
};
109111
});
110112

0 commit comments

Comments
 (0)