Chart rendering fails due to the "wrong sign in 'by' argument" error

Problem

Chart rendering fails due to the “wrong sign in ‘by’ argument” error.

Cause

This error occurs when the “Upper Range” or “Lower Range” values set in the category settings are inconsistent with the actual range of the data. Specifically:

  • The “Upper Range” value is smaller than the minimum value in the actual data range.
  • The “Lower Range” value is larger than the maximum value in the actual data range.

For example, if the X-axis uses “Age” (with a data range of 0–100), the following Category settings would cause the error:

  • Setting the “Upper Limit” to “-10”.
  • Setting the “Lower Limit” to “1000”.

Solution

Open the Category Setting dialog and set appropriate values to the Upper Range and Lower Range.