I had made small modification in the Chart Views Module as well as Chart API to allow a user to integrate the Chart Axes and Gridlines as well as append Value Range Markers and Custom Field Markers to their chart. This would not work for Pie charts as Axes are not allowed in them but it works pretty well and good for Bar and Line Charts. I have attached the patch for it.
There were a few bugs in the Chart API which I had corrected.
I have also attached screenshots for the kind of chart developed from Chart Views, once the Axis Labels are appended.

There was an option to set Labels for a chart, but the output was not formatted, a reason being that the labels were set against the attribute 'chl' which works only for Pie Charts. For Bar charts, Line Charts, labels need to be set against 'chxl' needs to be set and this patch would help for the same. Moreover the formatting of the 'chl' labels is terrible when the option is checked and I would develop a patch soon to rectify it.

Comments

13rac1’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new17.52 KB

Removed extra white space, otherwise applies cleanly. Settings are available and seem to work correctly.

maulik.kamdar’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new18.01 KB

Hello,

I had modified the patch a little for a cleaner Settings form. The current form includes a lot of fieldsets and I realized I can carry out the same functionality using the #dependency attribute for the fields.

13rac1’s picture

Errors occur while applying this patch. Can you correct?

axes-gridlines-1206306-2.patch:314: trailing whitespace.
    ); 
axes-gridlines-1206306-2.patch:349: trailing whitespace.
            $chart['#labels'][] = ($this->options['label_append_value'] ? $row->{$field->field_alias} : '');          
axes-gridlines-1206306-2.patch:358: trailing whitespace.
              $chart['#mixed_axis_labels'][CHART_AXIS_Y_RIGHT][0][] = ($this->options['y_right_set'] == "field" ? chart_mixed_axis_label($row->{$field->field_alias}) : ''); 
axes-gridlines-1206306-2.patch:374: trailing whitespace.
      
axes-gridlines-1206306-2.patch:378: trailing whitespace.
  
error: patch failed: chart.module:632
error: chart.module: patch does not apply
BenK’s picture

Subscribing

maulik.kamdar’s picture

Status: Needs review » Active

A combined patch #1285554: Combined Patch for Chart Views Features has been written for the new Views Features, which also includes the integration of Gridlines and Axis Labels.

This new patch however can only be applied to a new temporary branch named 7.x-1.x-mk.
To clone:
git clone --branch 7.x-1.x-mk http://git.drupal.org/project/chart.git

Pierre.Vriens’s picture

Issue summary: View changes
Parent issue: » #2371075: Chart 7.x-2.x Release
Pierre.Vriens’s picture

Status: Active » Needs review