Returns options for barplot
(&self)
| 289 | |
| 290 | /// Returns options for barplot |
| 291 | fn options(&self) -> String { |
| 292 | let mut opt = String::new(); |
| 293 | if self.label != "" { |
| 294 | write!(&mut opt, ",label=r'{}'", self.label).unwrap(); |
| 295 | } |
| 296 | if self.colors.len() > 0 { |
| 297 | write!(&mut opt, ",color=colors").unwrap(); |
| 298 | } |
| 299 | if self.width > 0.0 { |
| 300 | write!(&mut opt, ",width={}", self.width).unwrap(); |
| 301 | } |
| 302 | if self.bottom.len() > 0 { |
| 303 | write!(&mut opt, ",bottom=bottom").unwrap(); |
| 304 | } |
| 305 | if self.errors.len() > 0 { |
| 306 | if self.horizontal { |
| 307 | write!(&mut opt, ",xerr=err").unwrap(); |
| 308 | } else { |
| 309 | write!(&mut opt, ",yerr=err").unwrap(); |
| 310 | } |
| 311 | } |
| 312 | if self.extra != "" { |
| 313 | write!(&mut opt, ",{}", self.extra).unwrap(); |
| 314 | } |
| 315 | opt |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | impl GraphMaker for Barplot { |
no outgoing calls
no test coverage detected