首页 > 解决方案 > Positioning the text straight in horizontal stacked bar in d3

问题描述

Output that I received I have a problem with positioning the text in horizontal stacked bar, this is the data set that I receive from back-end

data set = [
    { label: "FIFO", "Normal": 55, "Ab Normal": 40 },
    { label: "Urine MAY", "Normal": 5, "Ab Normal": 30 },
    { label: "LL", "Normal": 20, "Ab Normal": 30 },
    { label: "AC", "Normal": 10, "Ab Normal": 40 },
    { label: "Specialty", "Normal": 55, "Ab Normal": 15 },
];

I want the text inside the bar to be straight(-90) , but it is inverted

标签: d3.js

解决方案


推荐阅读