Inheritance logics

From Catglobe Wiki
Jump to: navigation, search



Inheritance logics

You can change the layout and style of individual charts by modifying their inline style sheets. But if you want to use the same layout and style for many charts, you should create an external style sheet and apply it to all of them, or to the reports displaying them. This will ensure a consistent look between your charts and make it easier to update the style of many charts at the same time.

Though you can apply one external style sheet to many charts, you still sometimes have to modify their inline style sheets to meet your needs. For example, if you want to change the background color of a chart without interfering with the others to which you apply the same external style sheet, you have to change it in the inline style sheet of that specific chart.

The inline style sheet does not initially apply any styles of its own. If not modified from its initial state it will inherit all settings from the default style sheet of the system or from an external style sheet that you apply to the chart or to the reports displaying the chart.

The inline style sheet of a chart can inherit settings from only one style sheet at a time. In other words, it cannot inherit some settings from one style sheet and some from another. At first, it inherits settings from the default style sheet. When you apply an external style sheet to the reports displaying the chart and view them, it inherits settings from the external style sheet and ignores the default style sheet. When you apply another external style sheet to the chart, it inherits settings from that external style sheet and ignores the one of the report as well as the default style sheet.

Related settings are grouped together. For example, the Chart size group of settings consists of the Width and Height settings.

If you do not want the inline style sheet of a chart to inherit settings in a particular group, you can deactivate the inheritance mode of that group in the inline style sheet. From that time on, what you specify in the inline style sheet for any settings in that group will take effect on the chart. The values of the corresponding settings in the default style sheet as well as in any external style sheets applied to the chart and the reports displaying it (if any) will then be ignored. You can reactivate the inheritance mode of the group in order for the inline style sheet to inherit the settings again.

The inline style sheet of a chart does not inherit a setting in a group individually. This means either all settings in the same group take effect on the chart, or none of them does. Consequently, you either have to specify all settings in a group or let them all to be inherited. For example, if you want to specify the size of a chart in the inline style sheet, you must specify both the width and height of the chart.

In order for the inline style sheet to inherit or not inherit a group of settings, you can select or clear the Inherit check box on the right side of the title bar of the group in the Inline Style Sheet editor.

check box inherit

The illustrations in the following table show how style sheets at different levels work together.

1. The default style sheet of the system

2. The external style sheet applied to the reports displaying the chart

3. The external style sheet applied to the chart

4. The inline style sheet of the chart

5. The final style applied to the chart

6218.jpg

6219.jpg

6219.jpg

6222.jpg

6223.jpg

6218.jpg

6220.jpg

6219.jpg

6222.jpg

6224.jpg

6218.jpg

6220.jpg

6221.jpg

6222.jpg

6225.jpg