<commit_before>OpenCharts-For-Sencha-Touch-and-ExtJS
=====================================

## OpenCharts Description

OpenCharts brings over 10 NVD3 charts to the Sencha Touch and ExtJS frameworks and is backwards compatible with both. NVD3 is a charting library that utilizes D3.js. Note that OpenCharts contains the minified version of D3 and NVD3, however, the source for those files should be updated independantly of this repository.

http://d3js.org/

http://nvd3.org/

## Using The Example Applications

I did not include the Sencha Touch or ExtJS source files in the example applications folders. To use the example applications, first copy the OpenCharts source to the example's root directory.

For ExtJS, copy the **ext** folder to the root of the ExtJSExample application.

For Sencha Touch, copy the **touch** folder to the root of the SenchaTouchExample application.

You can easily get a copy of these folders via command line by creating a sample application with the respective framework. Make sure you are in either the ExtJS or Sencha Touch framework folder and run the following command via Sencha Command:

**sencha generate app TestApp \path\to\generate\app**

Once the generic application has been generated by Sencha CMD, get the respective folder you need and copy it to the example application root.

**Note: These example applications were generated with the following versions.**

- ExtJS 4.2.2
- Sencha Touch 2.3.1

## Installation

**Step 1)** Copy the OpenCharts folder to the root of your ExtJS or Sencha Touch application.

**Step 2)** Update your app.json file to include the D3 and NVD3 source and css references.

"js": [
    {
        "path": "OpenCharts/lib/d3.min.js"
    },
    {
        "path": "OpenCharts/lib/nv.d3.min.js"
    }
],

"css": [
    {
        "path": "resources/css/nv.d3.min.css",
        "update": "delta"
    }
]

**Step 3)** Download the latest NVD3 library and put nv.d3.min.css in your resources folder (refer to step 2). Note that you can also grab the css file from either example application.

**Step 4)** Add a requires to OpenCharts in your app.js file (or the direct view the uses it)

requires: [
    'OpenCharts.OpenCharts'
]

**Step 5)** If you want to compile with Sencha CMD, make sure to update the app.classpath in your sencha.cfg file and add **${app.dir}/OpenCharts**

sencha.cfg is located in ".sencha/app/sencha.cfg"

Example: app.classpath=${app.dir}/app.js,${app.dir}/app,${app.dir}/OpenCharts<commit_msg>readme updates<commit_after>OpenCharts-For-Sencha-Touch-and-ExtJS
=====================================

## OpenCharts Description

OpenCharts brings over 10 NVD3 charts to the Sencha Touch and ExtJS frameworks and is backwards compatible with both. NVD3 is a charting library that utilizes D3.js. Note that OpenCharts contains the minified version of D3 and NVD3, however, the source for those files should be updated independantly of this repository.

- http://d3js.org/
- http://nvd3.org/

## Using The Example Applications

I did not include the Sencha Touch or ExtJS source files in the example applications folders. To use the example applications, first copy the OpenCharts source to the example's root directory.

For ExtJS, copy the **ext** folder to the root of the ExtJSExample application.

For Sencha Touch, copy the **touch** folder to the root of the SenchaTouchExample application.

You can easily get a copy of these folders via command line by creating a sample application with the respective framework. Make sure you are in either the ExtJS or Sencha Touch framework folder and run the following command via Sencha Command:

**sencha generate app TestApp \path\to\generate\app**

Once the generic application has been generated by Sencha CMD, get the respective folder you need and copy it to the example application root.

**Note: These example applications were generated with the following versions.**

- ExtJS 4.2.2
- Sencha Touch 2.3.1

## Installation

**Step 1)** Copy the OpenCharts folder to the root of your ExtJS or Sencha Touch application.

**Step 2)** Update your app.json file to include the D3 and NVD3 source and css references.

"js": [
    {
        "path": "OpenCharts/lib/d3.min.js"
    },
    {
        "path": "OpenCharts/lib/nv.d3.min.js"
    }
],

"css": [
    {
        "path": "resources/css/nv.d3.min.css",
        "update": "delta"
    }
]

**Step 3)** Download the latest NVD3 library and put nv.d3.min.css in your resources folder (refer to step 2). Note that you can also grab the css file from either example application.

**Step 4)** Add a requires to OpenCharts in your app.js file (or the direct view that uses it)

requires: [
    'OpenCharts.OpenCharts'
]

**Step 5)** If you want to compile with Sencha CMD, make sure to update the app.classpath in your sencha.cfg file and add **${app.dir}/OpenCharts**

*sencha.cfg is located in ".sencha/app/sencha.cfg"*

**Example:** app.classpath=${app.dir}/app.js,${app.dir}/app,${app.dir}/OpenCharts

## Usage

#### Classes and xtypes

- OpenCharts.charts.BarChart (xtype: **oc-barchart**)
- OpenCharts.charts.LineChart (xtype: **oc-linechart**)
- OpenCharts.charts.ScatterChart (xtype: **oc-scatterchart**)
- OpenCharts.charts.StackedAreaChart (xtype: **oc-stackedareachart**)
- OpenCharts.charts.StackedBarChart (xtype: **oc-stackedbarchart**)
- OpenCharts.charts.HorizontalStackedBarChart (xtype: **oc-horizontalstackedbarchart**)
- OpenCharts.charts.LinePlusBarChart (xtype: **oc-lineplusbarchart**)
- OpenCharts.charts.CumulativeLineChart (xtype: **oc-cumulativelinechart**)
- OpenCharts.charts.LineWithFocusChart (xtype: **oc-linewithfocuschart**)
- OpenCharts.charts.PieChart (xtype: **oc-piechart**)
- OpenCharts.charts.BulletChart (xtype: **oc-bulletchart**)
{'fraction_non_alphanumeric': 0.10829132626455762, 'fraction_numerical': 0.00973405179906136, 'mean_word_length': 4.183783783783784, 'pattern_counts': {'":': 12, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1129723', 'n_tokens_mistral': 1737, 'n_tokens_neox': 1679, 'n_words': 693}