Bubble chart, legend problem

7 posts, 0 answers
  1. Andrey
    Andrey avatar
    8 posts
    Member since:
    Aug 2012

    Posted 05 Oct 2012 Link to this post

    Hi there, for some reason I can't force bubble chart to show legend, at the same time I'm able to see category name in the tooltip, could you please explain why, thanks.

            $("#Chart1").kendoChart({
                    title: {
                        text: "Chart"
                    },
                    legend: {
                        visible: true,
                        position: "bottom"
                    },
                    dataSource: @{@Html.Raw(id)}ChartDataSource1,
                    seriesDefaults: {
                        type: "bubble"
                    },
                    seriesColors: ["#004D5C", "#FF8700", "#38A660", "#E5D843", "#80BF34"],
                    series:
                        [{
                            type: "bubble",
                            categoryField: "Field1",
                            xField: "Field2",
                            yField: "Field3",
                            sizeField: "Size",
                            colorField: "Color",
                            maxSize: 35,
                            minSize: 3,
                            visibleInLegendField: "true",
                            tooltip: {
                                visible: true,
                                format: "{2} {3}"
                            }

                        }
                        ]
                   ,
                    xAxis: {
                        //max: 1000,
                        labels: {
                            format: "{0}"
                        }
                    },
                    yAxis: {
                        //min: 80,
                        labels: {
                            format: "{0}"
                        }
                    },
            });

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 10 Oct 2012 Link to this post

    Hello Andrey,

    By design the legend shows the series name. Hence in order to display the legend in Kendo UI Bubble chart you should specify the series name. Like here: 
    $("#Chart1").kendoChart({
      title: {
        text: "Chart"
      },
       //...
      series: [{
        name: "My series 1"
        type: "bubble",
        categoryField: "Field1",
         //....
      }]
      //....
    });

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Andrey
    Andrey avatar
    8 posts
    Member since:
    Aug 2012

    Posted 11 Oct 2012 Link to this post

    Hi Iliana,
    Adding name to the set of series doesn't resolve my problem, please see attached image.
    I would like to have name for each series in the legend.
    Thanks.
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 12 Oct 2012 Link to this post

    Hello Andrey,

    In the provided code snippet I observed that you have definied only one series (that is why you get in the legend only SeriesName). Since the image shows 3 bubbles (which are actually the points of the series) I presume that you would like to show the name of each point. If this is your scenario I am afraid it is not supported (as I said in my previous post the legend shows the series name). In case I missed something please elaborate a bit more on the exact functionality you are trying to implement.

    All the best,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Joe Sugden
    Joe Sugden avatar
    54 posts
    Member since:
    Feb 2010

    Posted 18 Oct 2012 Link to this post

    Would be nice to be able to display point names in legend... We kinda need that too!
  6. Andrey
    Andrey avatar
    8 posts
    Member since:
    Aug 2012

    Posted 19 Oct 2012 Link to this post

    Hi Iliana,

    I would like to know why do you think I have only one series. My datasource contains three records and inside ‘series’ I bind the fields from the datasource to my series, I thought that in that case I create three different series.

    How then I can create three different series for every record in the datasource?

    Thanks, Andrey.

  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 23 Oct 2012 Link to this post

    Hi guys,

    @Joe
    I am afraid the implementation of this functionality is not in our immediate plans, however we may consider it for future releases. If you wish you may submit this idea as a feature request at our UserVoice portal. This way the community would be able to evaluate and commend it. The more votes it collect, the higher priority will have.

    @Andrey
    My assumption that you have only one series is due to the following definition:  
    $("#Chart1").kendoChart({
      //....
      series:
      [{
        type: "bubble",
        categoryField: "Field1",
        xField: "Field2",
        yField: "Field3",
        sizeField: "Size",
        colorField: "Color",
        maxSize: 35,
        minSize: 3,
        visibleInLegendField: "true",
        tooltip: {
          visible: true,
           format: "{2} {3}"
        }
      }]
      //....
    });

    From the provided image it seems you get 3 bubbles, which as I said in my previous post are the points of the series, not the actual series. For your scenario I believe using bubble chart with grouped data will be suitable.

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top