milliams / plotlib

Compare 71fdb5e ... +0 ... 5a2ae4a

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 2 of 3 files from the diff.

@@ -85,7 +85,7 @@
Loading
85 85
    */
86 86
    pub fn to_text(&self) -> Result<String> {
87 87
        let (width, height) = self.dimensions;
88 -
        // TODO compose multiple views into a plot
88 +
        // TODO compose multiple views into a page
89 89
        let view = self.views[0];
90 90
        view.to_text(width, height)
91 91
    }

@@ -20,6 +20,7 @@
Loading
20 20
use crate::repr::ContinuousRepresentation;
21 21
use crate::style::*;
22 22
use crate::svg_render;
23 +
use crate::text_render;
23 24
24 25
/// Representation of any plot with points in the XY plane, visualized as points and/or with lines
25 26
/// in-between.
@@ -173,11 +174,34 @@
Loading
173 174
174 175
    fn to_text(
175 176
        &self,
176 -
        _x_axis: &axis::ContinuousAxis,
177 -
        _y_axis: &axis::ContinuousAxis,
178 -
        _face_width: u32,
179 -
        _face_height: u32,
177 +
        x_axis: &axis::ContinuousAxis,
178 +
        y_axis: &axis::ContinuousAxis,
179 +
        face_width: u32,
180 +
        face_height: u32,
180 181
    ) -> String {
181 -
        "".into()
182 +
        let face_lines = if let Some(line_style) = &self.line_style {
183 +
            unimplemented!("Text rendering does not yet support line plots")
184 +
        } else {
185 +
            (0..face_height)
186 +
                .map(|_| " ".repeat(face_width as usize))
187 +
                .collect::<Vec<String>>()
188 +
                .join("\n")
189 +
        };
190 +
        let face_points = if let Some(point_style) = &self.point_style {
191 +
            text_render::render_face_points(
192 +
                &self.data,
193 +
                x_axis,
194 +
                y_axis,
195 +
                face_width,
196 +
                face_height,
197 +
                &point_style,
198 +
            )
199 +
        } else {
200 +
            (0..face_height)
201 +
                .map(|_| " ".repeat(face_width as usize))
202 +
                .collect::<Vec<String>>()
203 +
                .join("\n")
204 +
        };
205 +
        text_render::overlay(&face_lines, &face_points, 0, 0)
182 206
    }
183 207
}

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src -0.83% 61.94%
tests/test_no_data.rs 100.00%
Project Totals (14 files) 62.68%
Loading