Plugin Variables can have default values. The default value is used if the plugin cannot find a value for the variable. For example:
SELECT UNIX_TIMESTAMP(`date`), `%%P2=average_value%%` FROM `#__daily_summary`
WHERE `date` BETWEEN '%%P1=2007%%-01-01' AND '%%P1=2007%%-12-31'
Default values are also useful for testing your chart in the back end, where Plugin Variables do not have values. Default values can only be literal strings. They cannot be variables. However, you can work around this limitation in SQL, for example:
IF("%%P1%%" = "", "%%J_USER_USERNAME%%", "%%P1%%")