JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
General

GUI Reference: Chart Wizard

Define new charts that display information from the CodeSonar hub, modify existing charts.

Permission requirements for charting are discussed in Charts and Chart Tables: Permissions.

Charting is available for all analyses, regardless of the language or languages involved. However, charts and tables of procedure data will only include data from C/C++, C#, and Java code: procedure information is not available for other languages.



Availability

The chart wizard opens on top of the page from which it was invoked.

From Chart or Chart Table: Any of the following selections from the Options menu bar:
  • File / New chart
  • Edit / Change chart type
  • Edit / Change data
  • Edit / Change groups
  • Edit / Change options
  • Edit / Show chart wizard
From Analysis, Project, or Home Expand the Charts and Tables section, then select create new chart

Wizard Overview

The following annotated screenshot fragment shows the different parts of the CodeSonar chart wizard.

annotated screenshot: Chart Wizard, annotated title tabs tab contents previous/next links buttons chart preview close button

title Either Create new chart or Edit this chart.
tabs The wizard is divided into "tabs" that group related content. Use these links to move between the tabs. The available tabs depend on the type of chart.
tab contents Depend on the tab and on the type of chart. Full details are below.
previous/next links Provide a standard path through the tabs, and allow for backtracking.
close button Click to close the chart wizard without drawing a new chart or altering an existing one.
chart preview A preview of the chart corresponding to the current selections in the wizard. Click hide preview to close the preview panel, show preview to open it.
buttons Click Cancel to close the chart wizard without drawing a new chart or altering an existing one.

The label on the other button is Create Chart if you are creating a new chart, Update Chart if you are editing an existing chart. Click this button to close the chart wizard and draw the chart specified.

Chart Type Tab

Purpose Selecting the type of chart that will be created.
Available for: All chart types.

screenshot: chart wizard showing BAR selected in CHART TYPE tab

Chart Type Brief Description Wizard Tabs
bar Horizontally-oriented bar chart. chart type, data, groups, order, search, options
column Vertically-oriented bar chart. chart type, data, groups, order, search, options
line Line chart showing changes in one or more variables over the analyses of a single project. chart type, data, groups, search, options
scatterplot Scatterplot showing the relationships between two variables chart type, data, groups, search, options
pie A pie chart. chart type, data, search, options

Data Tab

Purpose: specify the data categories and values to display in the chart.
Available for: all chart types.

screenshot: chart wizard DATA tab for BAR chart

The tab contents depend on the chart type (as selected in the chart type tab).

Charts where one axis is Procedure and the other axis is a metric are based on a sample of the data specified on the Data and Search tabs rather than the full set of data. Specific sampling behavior is defined by the Sample and Sample Size fields on the Options tab.

Chart Type Fields
bar
X-Axis values to chart (bar length)
Y-Axis chart categories
column
X-Axis chart categories
Y-Axis values to chart (column height)
line
Project Each line in the chart describes a single project (or one group within that project, if selected); each point on the line describes an analysis of that project.
  • To add another project to the chart, click add project and select the project name from the list that appears.
  • To remove a project from a chart, click remove next to the project name.
Count values to chart (Y-axis)
scatterplot
Plot chart categories: each point on the chart describes a single category (or a group within that category, if selected).
X-Axis values for X axis
Y-Axis values for Y axis
pie
Slices chart categories
Count values to chart (slice size)

Use the search tab to specify additional constraints on the charted values.

The following table shows the available categories-values pairs for bar, column, and pie charts. (X = available, . = not available).

  VALUES
Number of Files Number of Lines Number of Warnings Other Metrics [see note]
CATEGORIES Analyses X X X all analysis-granularity metrics available
Classes . . X .
Directories X X X all file-granularity metrics available
Files . X X all file-granularity metrics available
Findings . . X .
Languages X X X all file-granularity metrics available
Owners . . X .
Priorities . . X .
Procedures . . X all procedure-granularity metrics available
Projects X X X all analysis-granularity metrics available
Significances . . X .
States . . X .

Metric Note: a metric class is 'available' if is it present in at least one analysis that has taken place on the hub (subject to ANALYSIS_READ permission).

Groups Tab

Purpose: specify a secondary category for grouping the chart data.
Available for: bar, column, line, and scatterplot charts.

All chart types except for pie charts allow the charted data to be grouped in various ways.

Screenshot: GROUPS tab of chart wizard for BAR chart, showing expansion

The available groups in bar, column, and line charts are the same as the domain options corresponding to your range selection (that is, one of the columns in the domain-range table), with the following exceptions.

The full set of exceptions is thus the following.

When Domain is... ...you can't group by...
Analyses Analysis, Project
Classes Class
Directories Directory
Files File, Directory, Analysis, Project
Findings Finding
Languages Language
Owners Owner
Priorities Priority
Procedures Procedure, File, Directory, Analysis, Project
Projects Project
States State

Order Tab

Purpose: specify a display order for the chart's data points.
Available for: bar and column charts.

Screenshot: ORDER tab of chart wizard for BAR chart

The bars in bar and column charts can be ordered by specifying a data category to Order By and a Direction.

Order By The available options depend on your domain selection as follows. Note that Count always refers to the length of the bar.
Domain Available "Order By" Options
Analyses Address, Description, Finished, Hub User, ID, Machine, Modified, Name, Started, User, Count
Classes Count, Class Name
Directories Count, Directory Name,
Files Full Path, Language, License Charge, Name, Count
Findings Count, Finding Name
Languages Count, Language Name
Owners Email, Name, Count
Priorities Priority Name, Count
Procedures Procedure Name, Count
Projects Created, Description, ID, Name, Count
States State Name, Count
Direction The available ordering directions are always Ascending and Descending.

Search Tab

Purpose: specify a subset of the selected data to chart, using CodeSonar search functionality.
Available for: all chart types.

Screenshot: Search tab of chart wizard for BAR chart

Options Tab

Purpose: specify captions and other aspects of chart appearance.
Available for: all chart types.

Screenshot: OPTIONS tab of chart wizard for BAR chart

Different chart types have different associated options, as shown in the following tables.

Chart Type Options Tab Fields
Title X Axis Y Axis Sample Sample Size Angled Labels Log Scale Show Legend
bar X X X (X) (X) . X (X)
column X X X (X) (X) X X (X)
line X X X . . X X (X)
scatterplot X X X (X) (X) . XX .
pie X . . (X) (X) . . .
Option Description Displayed
Title Title for the chart. Top of chart and chart page heading.
X Axis Label Caption for the X Axis. Under X axis.
Y Axis Label Caption for the Y Axis. Left of Y axis.
Sample Select the sampling strategy from the following:

Uniform Sampling: chart approximately every Nth value, in sorted order based on metric value, where N = Procedures / Sample Size. Note: Procedures = the number of in-scope procedures that satisfy conditions defined on the Search tab.

Highest Values: chart the M highest values in the set where M is the Sample Size.

Lowest Values: chart the M lowest values in the set where M is the Sample Size.

  • Bar, column, scatterplot, and pie charts only have this option if one axis is Procedure and the other axis is a metric, otherwise this option is not displayed.
  • Line charts never have this option.
-
Sample Size Define the number of sampled data points to be displayed in the chart (this corresponds to the value of M and N in the Sample field).
  • Bar, column, scatterplot, and pie charts only have this option if one axis is Procedure and the other axis is a metric, otherwise this option is not displayed.
  • Line charts never have this option.
-
Angled Labels If selected, X Axis labels will be oriented at a 45° angle.
If unselected, X Axis labels will be oriented vertically.
-
Log Scale If selected, the value axis will use a logarithmic scale.

If unselected, the value axis will use a linear scale.

  • Scatterplots have two value axes, so they have two log scale options: log x and log y.
  • Log scale is not available for charts with grouping.
-
Show Legend If selected, a chart legend will be displayed.

If unselected, no legend will be displayed.

  • Bar, column, and line charts only have this option if they are grouped, otherwise there is no legend.
  • A legend is always shown for scatterplots.
  • A legend is never shown for pie charts.
Toward top right corner of chart.

Related Tasks

 

To report problems with this documentation, please visit https://support.codesecure.com/.