_stream.py 953 Bytes
Newer Older
xuebingbing's avatar
xuebingbing committed
1 2 3 4
import _plotly_utils.basevalidators


class StreamValidator(_plotly_utils.basevalidators.CompoundValidator):
xuebingbing's avatar
xuebingbing committed
5
    def __init__(self, plotly_name="stream", parent_name="bar", **kwargs):
xuebingbing's avatar
xuebingbing committed
6 7 8
        super(StreamValidator, self).__init__(
            plotly_name=plotly_name,
            parent_name=parent_name,
xuebingbing's avatar
xuebingbing committed
9
            data_class_str=kwargs.pop("data_class_str", "Stream"),
xuebingbing's avatar
xuebingbing committed
10
            data_docs=kwargs.pop(
xuebingbing's avatar
xuebingbing committed
11 12
                "data_docs",
                """
xuebingbing's avatar
xuebingbing committed
13 14 15 16 17 18 19
            maxpoints
                Sets the maximum number of points to keep on
                the plots from an incoming stream. If
                `maxpoints` is set to 50, only the newest 50
                points will be displayed on the plot.
            token
                The stream id number links a data trace on a
xuebingbing's avatar
xuebingbing committed
20 21 22
                plot with a stream. See https://chart-
                studio.plotly.com/settings for more details.
""",
xuebingbing's avatar
xuebingbing committed
23 24 25
            ),
            **kwargs
        )