This is the official documentation of the agent_ruby Ruby agent.
Objective Chart example
Objective Charts are very similar to Value Charts, the only difference being that two numbers should be provided to the resultBuilder: the value and the objective.