| 227 | } |
| 228 | |
| 229 | af_err af_set_axes_label_format(const af_window window, |
| 230 | const char* const xformat, |
| 231 | const char* const yformat, |
| 232 | const char* const zformat, |
| 233 | const af_cell* const props) { |
| 234 | try { |
| 235 | if (window == 0) { AF_ERROR("Not a valid window", AF_ERR_INTERNAL); } |
| 236 | |
| 237 | ARG_ASSERT(2, xformat != nullptr); |
| 238 | ARG_ASSERT(3, yformat != nullptr); |
| 239 | |
| 240 | ForgeManager& fgMngr = forgeManager(); |
| 241 | |
| 242 | fg_chart chart = nullptr; |
| 243 | |
| 244 | fg_chart_type ctype = (zformat ? FG_CHART_3D : FG_CHART_2D); |
| 245 | |
| 246 | if (props->col > -1 && props->row > -1) { |
| 247 | chart = fgMngr.getChart(window, props->row, props->col, ctype); |
| 248 | } else { |
| 249 | chart = fgMngr.getChart(window, 0, 0, ctype); |
| 250 | } |
| 251 | |
| 252 | if (ctype == FG_CHART_2D) { |
| 253 | FG_CHECK(forgePlugin().fg_set_chart_label_format(chart, xformat, |
| 254 | yformat, "3.2%f")); |
| 255 | } else { |
| 256 | ARG_ASSERT(4, zformat != nullptr); |
| 257 | FG_CHECK(forgePlugin().fg_set_chart_label_format(chart, xformat, |
| 258 | yformat, zformat)); |
| 259 | } |
| 260 | } |
| 261 | CATCHALL; |
| 262 | return AF_SUCCESS; |
| 263 | } |
| 264 | |
| 265 | af_err af_show(const af_window wind) { |
| 266 | try { |
no test coverage detected