| Summary: | [Chart usability] Set table / chart to hide when no data | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Pierre Tessier <ptessier> |
| Component: | BIRT | Assignee: | Yi Wang <yi.wang> |
| Status: | VERIFIED FIXED | QA Contact: | Tianli Zhang <tzhang> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | bluesoldier, hchristensen, jerlich, Lionel.wyl, zqian |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | 2.5.0 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | Autoed | ||
|
Description
Pierre Tessier
We should add a checkbox to the Chart Area page called "Hide chart if there is no data to display". By default, this checkbox is checked (so that it behaves the same way as charts do today). If the checkbox is unchecked, the user wants to show the chart instance when there is no data for that instance. In this case, we should show the chart, but replace the plot area including axes (or pie for pie charts) with a white rectangle containing the message: "This chart contains no data". This string needs to be internationalized, and also changeable through scripting. That way a user can change the displayed message based on some input conditions. Note that even when a chart displays this "no data" rectangle, it retains its properties unrelated to data such as background color, title, border, etc. We can even display an empty legend. The "no data" rectangle will replace all data points, axes, and axis labels. *** Bug 218034 has been marked as a duplicate of this bug. *** Will add two properties in chart model and UI. The first property is to enable error message when data count is zero. The second property is to customize error message, just like title, which supports i18n and font. In case data empty, i.e. in case the series's data is bound with columns, but the row count of the dataset is zero, the chart will be hidden. Now there is a new choice, an empty message can be displayed on the plot area instead of chart graphics. 1. Added Label element "EmptyMessage" to the model of Chart, which indicates the message text to be displayed in case data empty. This message text is externalized and by default it's "This chart contains no data". 2. The visible property of the Label "EmptyMessage" is used to select the behavior by data empty. If invisible(by default) the whole chart will be hidden just like before, otherwise the empty message will be displayed. 3. The UI to modify "EmptyMessage" is in the "Chart Area" tab under "Format Chart" task page. There is a new group. 4. Just for developer: Added new helper class LabelLimiter, it can modify the label text (wrapping or shortening with ellipsis) so that it can be fit in a rectangle area. The wrapping width can be correctly computed even if the label text is rotated. The new feature works in 2.5.0 v20090123-0630 build. Mark as verified. There are problems with the original fix. 1. The UI does not contain the default message. The default value for the empty message should be "This chart contains no data" Right now when I uncheck the checkbox, the message text is blank. 2. The display of the "empty" chart should still show the axes and chart plot area, just with no bars. Since it knows the categories, we could show them, but this is no necessary. Its okay not to display the y-axis labels in this case as well. Centered in the chart drawing area should be the empty message label, displayed inside a white box with black border. 3. We should change the group name "Empty Message" in the UI to be "Conditional Visibility". I can see there will be confusion with the way the UI is right now. Here’s how we can clear it up: • Call the group name “Chart Visibility”. • Instead of a checkbox, create a radio set. The first (and default) radio button will say “Hide the chart if there is no data to display.” • The second radio button will say “Show the chart with the following message:” • Inset the “Text” and “Font” UI slightly to the right so that it appears as if it is associated with the second radio button. • The “Text” and “Font” UI will be disabled when the first radio button is selected. 1. Modified the UI according to Comment #7. 2. For ChartWithAxes in no data case, more things will be displayed in plot besides the empty message, include Axis Lines, Axis Titles and Axis walls for 2D+/3D. Verified in 2.5.0 v20090512-0630 build. |