Closed jagdishkumar1 closed 1 year ago
This is mostly up for @cameroncalder's review. Would we want to allow for any of those customizations?
@theiliad with the new legend options in 0.16.24 version, can we just add a "disabled" legend option to achieve?
@theiliad with the new legend options in 0.16.24 version, can we just add a "disabled" legend option to achieve?
yeah we could, it's just a matter of design approval for disabling legends
Similar requirement on line chart as well ..
Expectation:
Current support:
Requirements: 2) Removal of grid and Y-axis line 3) legends positioned to the right of charts
Is there any config which can support the positioning on legends (top / right / left / bottom) in any chart ?
Expectation :
Here, legends are expected to be positioned at the bottom of bar chart
@theiliad @jagdishkumar1 Many of the points above are quite acceptable and should allow for configuration. Particularly the following:
Removing the legend has appropriate use cases. For example, if there is only a single data category being visualized and the title of the chart provides enough context.
The option to remove labels on a donut/pie chart is reasonable as well. Or making the labels numbers to the whole instead of percentages. If labels are removed though, I recommend leveraging the Carbon charts legend style instead of the style shown in the example.
I also need to remove the legend (since there's only a single data category in my charts). This is required for my 1Q release. @cameroncalder does your comment above count as design approval?
Is there any config which can support the positioning on legends (top / right / left / bottom) in any chart ?
Expectation :
![]()
Here, legends are expected to be positioned at the bottom of bar chart
You can position the legend using this config in the chart options:
{
legend: {
position: "top" | "left" | "bottom" | "right"
}
}
@cameroncalder @theiliad let me know if the features requested as part of this issue are in place, so that we can start leveraging them ? Thanks
I also need to remove the labels (%) displayed at the outer of donut chart, is this feature already available in latest version ?
PR #927 should provide the option to enable/disable the labels on pie/donut
@cameroncalder, you wrote above "Or making the labels numbers to the whole instead of percentages. ". Is that already possible or will be for the donut chart ? Also would it be possible to choose to display the whole numbers next to the legend color squares as shown in the initial screenshot from @jagdishkumar1 at the top of this discussion ?
@cameroncalder, you wrote above "Or making the labels numbers to the whole instead of percentages. ". Is that already possible or will be for the donut chart ? Also would it be possible to choose to display the whole numbers next to the legend color squares as shown in the initial screenshot from @jagdishkumar1 at the top of this discussion ?
Hi @daniel-m-s, This is really something for @jeanservaas to chime in now
@daniel-m-s
Sorry, took me a second to realize what was going on here. Cameron is OG Charts and has approval rights. He's giving approval on:
Removing the legend in appropriate use cases. (For example, if there is only a single data category being visualized and the title of the chart provides enough context).
The option to remove labels on a donut/pie chart is reasonable as well. Or making the labels numbers to the whole instead of percentages.
But to your question above daniel, i think what he's saying is to use Carbon styling if the whole numbers are removed from the donut chart and used instead IN the legend next to the label.
Here's an example from our guidance of how we do that: the percentage comes after the label in semibold. @cameroncalder is this what you meant?
Thanks @jeanservaas ! Your screenshot shows what we need, just with the option to display absolute values instead of percentages. @theiliad, if you have an outlook when you'll be able to implement this, let me know please.
I am submitting a...
charts version: 0.16.8
Issue description
I am trying to achieve something like below:
what I am able to achieve with current carbon-charts is below:![image](https://user-images.githubusercontent.com/2225196/67260610-d8817280-f4b9-11e9-90f7-353d4b257db6.png)
so , what can I do to closely match with the expected behaviour shown in first snapshot ?
1) How can I use to reduce the gap between the donut chart and labels on the right ? 2) How can I use to remove the labels (%) displayed at the outer of donut chart ? 3) What config can I use to remove labels displayed on the right ? 4) How can I remove the grid in bar chart ? 5) Labels/legends should always appear to the right of donut chart, and not like whats shown in second snapshot with
+
sign at the top right of donut chart