Lines mark with the possibility to change the line width and color for each segment. !!! warning In the case of the FlexLines mark, scales for 'x' and 'y' **must** be provided. Scales for the color and width data attributes are optional. In the case where another data at
| 429 | |
| 430 | @register_mark('bqplot.FlexLine') |
| 431 | class FlexLine(Mark): |
| 432 | |
| 433 | """Lines mark with the possibility to change the line width and color for each segment. |
| 434 | |
| 435 | !!! warning |
| 436 | In the case of the FlexLines mark, scales for 'x' and 'y' **must** be provided. |
| 437 | Scales for the color and width data attributes are optional. In the case |
| 438 | where another data attribute than 'x' or 'y' is provided but the |
| 439 | corresponding scale is missing, the data attribute is ignored. |
| 440 | |
| 441 | Data Attributes |
| 442 | --------------- |
| 443 | |
| 444 | Attributes |
| 445 | ---------- |
| 446 | x: numpy.ndarray (default: []) |
| 447 | abscissas of the data points (1d array) |
| 448 | y: numpy.ndarray (default: []) |
| 449 | ordinates of the data points (1d array) |
| 450 | color: numpy.ndarray or None (default: None) |
| 451 | Array controlling the color of the data points |
| 452 | width: numpy.ndarray or None (default: None) |
| 453 | Array controlling the widths of the Lines. |
| 454 | |
| 455 | Style Attributes |
| 456 | ---------------- |
| 457 | |
| 458 | Attributes |
| 459 | ---------- |
| 460 | name: string (class-level attributes) |
| 461 | user-friendly name of the mark |
| 462 | colors: list of colors (default: CATEGORY10) |
| 463 | List of colors for the Lines |
| 464 | stroke_width: float (default: 1.5) |
| 465 | Default stroke width of the Lines |
| 466 | """ |
| 467 | # Mark decoration |
| 468 | icon = 'fa-line-chart' |
| 469 | name = 'Flexible lines' |
| 470 | |
| 471 | # Scaled attributes |
| 472 | x = Array([]).tag(sync=True, scaled=True, rtype='Number', |
| 473 | atype='bqplot.Axis', |
| 474 | **array_serialization)\ |
| 475 | .valid(array_squeeze, array_dimension_bounds(1, 1)) |
| 476 | y = Array([]).tag(sync=True, scaled=True, |
| 477 | rtype='Number', |
| 478 | atype='bqplot.Axis', |
| 479 | **array_serialization)\ |
| 480 | .valid(array_squeeze, array_dimension_bounds(1, 1)) |
| 481 | color = Array(None, allow_none=True)\ |
| 482 | .tag(sync=True, scaled=True, rtype='Color', |
| 483 | atype='bqplot.ColorAxis', |
| 484 | **array_serialization).valid(array_squeeze) |
| 485 | width = Array(None, allow_none=True)\ |
| 486 | .tag(sync=True, scaled=True, rtype='Number', |
| 487 | **array_serialization).valid(array_squeeze) |
| 488 |
nothing calls this directly
no test coverage detected
searching dependent graphs…