c3 icon indicating copy to clipboard operation
c3 copied to clipboard

Labelling Issues

Open CHR15- opened this issue 12 years ago • 18 comments

The margin between labels being set with the current API does not work effectively with many items in the legend.. for example: item: { width: '10' }

screen shot 2014-03-11 at 17 17 45

Would it be possible to (rather than specifying a width..) position the legend onto a new line if they exceed the chart length?

At the moment, we have turned off the legend as it does not display well with many items in the legend... however, this has a caused an issue with the pie chart...

screen shot 2014-03-11 at 17 18 59

Could we choose to display no values in the pie chart and be able to use a legend with the little transition when selecting a section of the pie?

For example... this pie chart would have no legend or values but would have a tooltip to display the values?

screen shot 2014-03-11 at 17 28 16

CHR15- avatar Mar 11 '14 17:03 CHR15-

Hi,

I agree with your idea to locate legends in new line when a lot of items. This is reported as #15 and I'll work on this in that issue.

For pie chart, I agree too. I'll add some options you can use for the purpose I reported. Please give me some time.

Thanks!

masayuki0812 avatar Mar 12 '14 12:03 masayuki0812

I added arc.label.show option and you can hide labels on pie chart by setting this option false. And I modified to show tooltip on Pie chart (and Donut chart). Could you try the latest version?

For the legend issue, I'm working on now..

Thank you.

masayuki0812 avatar Mar 13 '14 01:03 masayuki0812

Is there a flag I must set to show the tooltip on the pie chart? I cannot see it on the c3 website?

CHR15- avatar Mar 13 '14 09:03 CHR15-

Sorry, I've updated. I think you can see now. http://c3js.org/samples/chart_pie.html

masayuki0812 avatar Mar 13 '14 09:03 masayuki0812

All good, just legend to do! :octocat:

CHR15- avatar Mar 13 '14 11:03 CHR15-

screen shot 2014-03-13 at 18 59 27

Example of the pie chart working :+1:

CHR15- avatar Mar 13 '14 19:03 CHR15-

I think legend issue has been fixed. Please try the latest version.

masayuki0812 avatar Mar 15 '14 16:03 masayuki0812

Legend seems to stack nicely, but the axis and half the chart is missing :(

screen shot 2014-03-17 at 10 49 00

CHR15- avatar Mar 17 '14 10:03 CHR15-

Hi, I assume you're using resize API for this situation. Is it right?

masayuki0812 avatar Mar 17 '14 11:03 masayuki0812

thats correct yes, on resizing.. this also seems to happen:

screen shot 2014-03-17 at 11 11 58

CHR15- avatar Mar 17 '14 12:03 CHR15-

I think the issue about unexpected crop has been fixed. Could you try the latest version?

How can I reproduce the second situation? Could you provide me some code?

masayuki0812 avatar Mar 17 '14 14:03 masayuki0812

Ill see if I can replicate the issue in JSFiddle

CHR15- avatar Mar 18 '14 09:03 CHR15-

@masayuki0812 this is still an issue, the resize() is causing the labels to fold back in and overlap

CHR15- avatar Mar 25 '14 23:03 CHR15-

oh, I'm sorry.. I reopen this. It would be really helpful for me if you could provide some code about this.

masayuki0812 avatar Mar 25 '14 23:03 masayuki0812

http://jsfiddle.net/e482V/14/ is an issue with the resizing that is causing 'Error: Invalid negative value for attribute height="-5"' in the console and we are receiving many of these errors.

CHR15- avatar Mar 26 '14 00:03 CHR15-

I think the issue about negative value for height has been fixed.

The issue you reported in https://github.com/masayuki0812/c3/issues/64#issuecomment-37808543 still occurs? If not, I'll close this issue.

masayuki0812 avatar Mar 26 '14 07:03 masayuki0812

Sure, let's go ahead and close this one

CHR15- avatar Mar 26 '14 07:03 CHR15-

OK, I close this.

masayuki0812 avatar Mar 30 '14 02:03 masayuki0812