import React from "react"; import styles from "../App.module.css"; import { calcHSLFromScore } from "../utils/color"; import { FeatureOutput } from "../models/visualizationOutput"; interface ContributionsProps { feature_outputs: FeatureOutput[]; } function Contributions(props: ContributionsProps) { return ( <> {props.feature_outputs.map((f) => { // pad bar height so features with 0 contribution can still be seen // in graph const contribution = f.contribution * 100; const bar_height = contribution > 10 ? contribution : contribution + 10; return (
{f.name}
); })} ); } export default Contributions;