def legend(is_legend_show=True,
           legend_orient="horizontal",
           legend_pos="center",
           legend_top='top',
           legend_selectedmode='multiple',
           **kwargs):
    """ Legend component.
        Legend component shows symbol, color and name of different series.
        You can click legends to toggle displaying series in the chart.
        In ECharts 3, a single echarts instance may contain multiple legend components,
        which makes it easier for the layout of multiple legend components.
    :param is_legend_show:
        It specifies whether to show the legend component.
    :param legend_orient:
        The layout orientation of legend.It can be 'horizontal', 'vertical'
    :param legend_pos:
        Distance between legend component and the left side of the container.
        legend_pos value can be instant pixel value like 20;
        it can also be percentage value relative to container width like '20%';
        and it can also be 'left', 'center', or 'right'.
    :param legend_top:
        Distance between legend component and the top side of the container.
        legend_top value can be instant pixel value like 20;
        it can also be percentage value relative to container width like '20%';
        and it can also be 'top', 'middle', or 'bottom'.
    :param legend_selectedmode:
        State table of selected legend. 'single' or 'multiple'
    :param kwargs:
    :return:
    """
    _legend = {
        "selectedMode": legend_selectedmode,
        "show": is_legend_show,
        "left": legend_pos,
        "top": legend_top,
        "orient": legend_orient
    }
    return _legend