This is a migrated thread and some comments may be shown as answers.

Bubble chart, legend problem

6 Answers 127 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 05 Oct 2012, 03:56 PM

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}"
                    }
                },
        });

6 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 10 Oct 2012, 08:17 AM
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!
0
Andrey
Top achievements
Rank 1
answered on 11 Oct 2012, 03:43 PM
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.
0
Iliana Nikolova
Telerik team
answered on 12 Oct 2012, 06:40 PM
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!
0
Joe Sugden
Top achievements
Rank 1
answered on 18 Oct 2012, 03:51 PM
Would be nice to be able to display point names in legend... We kinda need that too!
0
Andrey
Top achievements
Rank 1
answered on 19 Oct 2012, 07:16 PM

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.

0
Iliana Nikolova
Telerik team
answered on 23 Oct 2012, 09:04 AM
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!
Tags
Charts
Asked by
Andrey
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Andrey
Top achievements
Rank 1
Joe Sugden
Top achievements
Rank 1
Share this question
or