Commit bebc61ca authored by amarcic's avatar amarcic
Browse files

timeline, zoom: added semantic zoom to y position of labels

parent 1a55ae2e
......@@ -82,14 +82,14 @@ export const TimelineChart = (props) => {
.attr("transform", transform);
const xScaleNew = transform.rescaleX(xScale);
//const yScaleNew = transform.rescaleY(yScale);
const yScaleNew = yScale.range([height,0].map( d => transform.applyY(d) ));
xAxis.scale(xScaleNew);
xAxisDraw.call(xAxis);
svg.selectAll(".label")
.attr("x", value => xScaleNew(value.periodSpan?.[0]))
//.attr("y", value => yScaleNew(value.periodId));
.attr("y", value => yScaleNew(value.periodId));
};
const zimzoom = zoom()
.scaleExtent([1,5])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment