@icij/murmur-next 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/lib/datavisualisations/LineChart/LineChart.vue.d.ts +6 -0
- package/dist/lib/murmur.js +7 -3
- package/dist/lib/murmur.js.map +1 -1
- package/dist/lib/murmur.umd.cjs +1 -1
- package/dist/lib/murmur.umd.cjs.map +1 -1
- package/lib/datavisualisations/LineChart/LineChart.vue +15 -6
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
1
2
|
export interface LineChartProps {
|
|
2
3
|
/**
|
|
3
4
|
* Color of the line. Falls back to theme's dark color.
|
|
@@ -62,6 +63,11 @@ export interface LineChartProps {
|
|
|
62
63
|
* Aspect ratio (height/width) for the chart.
|
|
63
64
|
*/
|
|
64
65
|
chartHeightRatio?: number;
|
|
66
|
+
/**
|
|
67
|
+
* D3 curve factory for line interpolation (e.g. d3.curveStep, d3.curveMonotoneX).
|
|
68
|
+
* Defaults to d3.curveLinear.
|
|
69
|
+
*/
|
|
70
|
+
curve?: d3.CurveFactory;
|
|
65
71
|
/**
|
|
66
72
|
* Enable social mode for optimal display when sharing on social media.
|
|
67
73
|
*/
|
package/dist/lib/murmur.js
CHANGED
|
@@ -31830,6 +31830,7 @@ const zde = ["width", "height"], Hde = ["x", "y"], Ude = ["width", "height", "x"
|
|
|
31830
31830
|
data: { default: null },
|
|
31831
31831
|
dataUrlType: { default: "json" },
|
|
31832
31832
|
chartHeightRatio: { default: void 0 },
|
|
31833
|
+
curve: { default: void 0 },
|
|
31833
31834
|
socialMode: { type: Boolean, default: !1 },
|
|
31834
31835
|
socialModeRatio: { default: 5 / 4 }
|
|
31835
31836
|
},
|
|
@@ -31870,7 +31871,10 @@ const zde = ["width", "height"], Hde = ["x", "y"], Ude = ["width", "height", "x"
|
|
|
31870
31871
|
for (const j of y.value)
|
|
31871
31872
|
H[j] = +Z[j];
|
|
31872
31873
|
return H;
|
|
31873
|
-
}) : []), te =
|
|
31874
|
+
}) : []), te = I(() => {
|
|
31875
|
+
const Z = m1().x((H) => H.x).y((H) => H.y);
|
|
31876
|
+
return r.curve && Z.curve(r.curve), Z;
|
|
31877
|
+
}), se = Pb("%Y");
|
|
31874
31878
|
function X() {
|
|
31875
31879
|
s.value && (a.value = s.value.offsetWidth, o.value = r.fixedHeight !== null ? r.fixedHeight : s.value.offsetWidth * b.value);
|
|
31876
31880
|
}
|
|
@@ -31887,7 +31891,7 @@ const zde = ["width", "height"], Hde = ["x", "y"], Ude = ["width", "height", "x"
|
|
|
31887
31891
|
}));
|
|
31888
31892
|
return {
|
|
31889
31893
|
key: H,
|
|
31890
|
-
path: te(j),
|
|
31894
|
+
path: te.value(j),
|
|
31891
31895
|
color: x.value(H)
|
|
31892
31896
|
};
|
|
31893
31897
|
});
|
|
@@ -31896,7 +31900,7 @@ const zde = ["width", "height"], Hde = ["x", "y"], Ude = ["width", "height", "x"
|
|
|
31896
31900
|
x: B.value.x(j[r.timeseriesKey]),
|
|
31897
31901
|
y: B.value.y(j[r.seriesName])
|
|
31898
31902
|
}));
|
|
31899
|
-
l.value = te(H);
|
|
31903
|
+
l.value = te.value(H);
|
|
31900
31904
|
}
|
|
31901
31905
|
Vt(s.value).select(".line-chart__axis--x").call(
|
|
31902
31906
|
Lh(B.value.x).ticks(r.xAxisTicks).tickFormat((H) => n(g, H.getFullYear()))
|