Skip to content

Commit

Permalink
fix: improved border-color of events in timeline visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 8, 2020
1 parent bba8b35 commit 935354a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/visualizations/VisTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ div#visualization {
}
.timeline-item {
border-color: rgba(0, 0, 0, 0.075);
border-radius: 2px;
}
}
Expand All @@ -26,6 +25,7 @@ div#visualization {
<script lang="ts">
import _ from 'lodash';
import moment from 'moment';
import Color from 'color';
import { buildTooltip } from '../util/tooltip.js';
import { getColorFromString, getTitleAttr } from '../util/color.js';
Expand Down Expand Up @@ -97,14 +97,16 @@ export default {
// Build items
const items = _.map(this.chartData, (row, i) => {
const bgColor = row[5];
const borderColor = Color(bgColor).darken(0.3);
return {
id: String(i),
group: row[0],
content: row[1],
title: row[2],
start: moment(row[3]),
end: moment(row[4]),
style: `background-color: ${row[5]}`,
style: `background-color: ${bgColor}; border-color: ${borderColor}`,
};
});
Expand Down

0 comments on commit 935354a

Please sign in to comment.