INNER CODE UNIT · Rust
render_svg_with_text_measure
edwardkim/rhwp · crates/rhwp-ooxml-chart/src/lib.rs:443
pub fn render_svg_with_text_measure(
&self,
bounds: [f64; 4],
measure: &dyn Fn(&str, f64, &str) -> f64,
) -> String {
let [x, y, w, h] = bounds;
renderer::render_chart_svg_with_text_measure(self, x, y, w, h, measure)
}
/// 시리즈가 여러 타입을 섞어 쓰는지 (콤보 차트) 여부
pub fn is_combo(&self) -> bool {
let mut types: std::collections::HashSet<OoxmlChartType> = std::collections::HashSet::new();
for s in &self.series {
if s.series_type != OoxmlChartType::Unknown {
types.insert(s.series_type);
}
}
types.len() > 1