Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48670

Re: Custom Visuals- How to move text when resizing chart

$
0
0

This solved the issue .

            let text = this.barContainer.selectAll('.bar').data(viewModel.dataPoints);

            text.enter()
                .append('text')
                .classed('bartext', true)
                .text(d => <string>d.value2);
            text.attr({
                y: d => height - 15,
                x: d => xScale(d.category) + xScale.rangeBand() / 2,
                'text-anchor': "middle",
                fill: "red"
            });

Viewing all articles
Browse latest Browse all 48670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>