diff --git a/theme/views_highcharts.theme.inc b/theme/views_highcharts.theme.inc
index 510b96a..a27a051 100644
--- a/theme/views_highcharts.theme.inc
+++ b/theme/views_highcharts.theme.inc
@@ -50,14 +50,19 @@ function template_preprocess_views_highcharts(&$vars) {
 	
   $data = array();
   $highcharts_config->xAxis->categories = array();
+  $categories = array();
   foreach ($view->style_plugin->render_tokens as $result_index => $row) {
     foreach ($row as $field_name => $field) {
-		$f = str_replace(array('[',']'), "", $field_name);
-		if ($options['x_axis']['dataset_data'][$f]) {
-			$data[$f][] = (float)$field;
-		}
+      $f = str_replace(array('[',']'), "", $field_name);
+      if ($options['x_axis']['dataset_data'][$f]) {
+        $data[$f][] = (float)$field;
+      }
+      if (trim($field_name, "[]") == $options['x_axis']['dataset_label']) {
+        $categories[] = $field;
+      }
     }
   }
+  $highcharts_config->xAxis->categories = $categories;
 	if (function_exists("highcharts_series_".$options['format']['chart_type'])) {
 		//if there's a specialized data writer, return data from data writer
 		$highcharts_config->series = array(call_user_func("highcharts_series_".$options['format']['chart_type'], $data, $fields, $options));
