| 2589 | self.set_uid = set_uid |
| 2590 | |
| 2591 | def description(self): |
| 2592 | trace_types = str(list(self.class_strs_map.keys())) |
| 2593 | |
| 2594 | trace_types_wrapped = "\n".join( |
| 2595 | textwrap.wrap( |
| 2596 | trace_types, |
| 2597 | initial_indent=" One of: ", |
| 2598 | subsequent_indent=" " * 21, |
| 2599 | width=79 - 12, |
| 2600 | ) |
| 2601 | ) |
| 2602 | |
| 2603 | desc = ( |
| 2604 | """\ |
| 2605 | The '{plotly_name}' property is a tuple of trace instances |
| 2606 | that may be specified as: |
| 2607 | - A list or tuple of trace instances |
| 2608 | (e.g. [Scatter(...), Bar(...)]) |
| 2609 | - A single trace instance |
| 2610 | (e.g. Scatter(...), Bar(...), etc.) |
| 2611 | - A list or tuple of dicts of string/value properties where: |
| 2612 | - The 'type' property specifies the trace type |
| 2613 | {trace_types} |
| 2614 | |
| 2615 | - All remaining properties are passed to the constructor of |
| 2616 | the specified trace type |
| 2617 | |
| 2618 | (e.g. [{{'type': 'scatter', ...}}, {{'type': 'bar, ...}}])""" |
| 2619 | ).format(plotly_name=self.plotly_name, trace_types=trace_types_wrapped) |
| 2620 | |
| 2621 | return desc |
| 2622 | |
| 2623 | def get_trace_class(self, trace_name): |
| 2624 | # Import trace classes |