<commit_before># Visualization

## How it works

Building charts from queries is easier than ever.

Clients have a #draw method which accepts a query, a DOM node and a configuration object as arguments. You can call this directly on the client, which will execute a request and visualize its response, like so:

```javascript
client.draw(query, node, config);
```

## Example usage

```javascript
Keen.ready(function(){

  var query = new Keen.Query("count", {
    eventCollection: "pageviews",
    timeframe: "this_14_days",
    groupBy: "visitor.geo.country"
    interval: "daily"
  });

  var chart = client.draw(query, document.getElementById("chart-wrapper"), {
    title: "Custom chart title",
    chartType: "columnchart"
  });

});<commit_msg>Fixed syntax error in sample code<commit_after># Visualization

## How it works

Building charts from queries is easier than ever.

Clients have a #draw method which accepts a query, a DOM node and a configuration object as arguments. You can call this directly on the client, which will execute a request and visualize its response, like so:

```javascript
client.draw(query, node, config);
```

## Example usage

```javascript
Keen.ready(function(){

  var query = new Keen.Query("count", {
    eventCollection: "pageviews",
    timeframe: "this_14_days",
    groupBy: "visitor.geo.country",
    interval: "daily"
  });

  var chart = client.draw(query, document.getElementById("chart-wrapper"), {
    title: "Custom chart title",
    chartType: "columnchart"
  });

});
{'fraction_non_alphanumeric': 0.11359159553512804, 'fraction_numerical': 0.0026263952724885093, 'mean_word_length': 4.328671328671328, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4586627', 'n_tokens_mistral': 444, 'n_tokens_neox': 425, 'n_words': 165}