mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +02:00
Fix git graph
This commit is contained in:
@@ -52,16 +52,19 @@ function svgCreateDefs (svg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function svgDrawLine (svg, points, colorIdx, interpolate) {
|
function svgDrawLine (svg, points, colorIdx, interpolate) {
|
||||||
interpolate = interpolate || 'basis'
|
let curve = d3.curveBasis
|
||||||
|
if (interpolate === 'linear') {
|
||||||
|
curve = d3.curveLinear
|
||||||
|
}
|
||||||
const color = config.branchColors[colorIdx % config.branchColors.length]
|
const color = config.branchColors[colorIdx % config.branchColors.length]
|
||||||
const lineGen = d3.svg.line()
|
const lineGen = d3.line()
|
||||||
.x(function (d) {
|
.x(function (d) {
|
||||||
return Math.round(d.x)
|
return Math.round(d.x)
|
||||||
})
|
})
|
||||||
.y(function (d) {
|
.y(function (d) {
|
||||||
return Math.round(d.y)
|
return Math.round(d.y)
|
||||||
})
|
})
|
||||||
.interpolate(interpolate)
|
.curve(curve)
|
||||||
|
|
||||||
svg
|
svg
|
||||||
.append('svg:path')
|
.append('svg:path')
|
||||||
|
Reference in New Issue
Block a user