Repository: bokeh/bokeh

Issue:
text_align attribute in NumberFormatter not doing anything
When making a `datatable`, I want to right align numerical values in the table, but when I set the `text_align` attribute in `NumberFormatter`, the values continue to remain left aligned.  Here is my enviornment:
* Python 2.7.12 :: Anaconda 4.1.1 (64-bit)
* numpy==1.11.1
* pandas==0.18.1
* bokeh==0.12.4
* Windows 7, Chrome

And here is a code snippet:
```
import pandas as pd
import numpy as np
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, NumberFormatter, TableColumn
from bokeh.plotting import show

df = []
for ii in range(1, 11):
    df.append({'x': ii, 'y': 1000 * np.random.rand()})
df = pd.DataFrame(df)

source = ColumnDataSource(data=df)

columns = [
    TableColumn(field='x', title='Col 1'),
    TableColumn(field='y', title='Col 2',
                formatter=NumberFormatter(format='$0,0.00',
                                          text_align='right')),
]

dt = DataTable(source=source, columns=columns, width=500, height=200, row_headers=False)

show(dt)
```

Here is the output I am getting in my Jupyter Notebook:
![untitled](https://cloud.githubusercontent.com/assets/6929405/21940662/53797720-d993-11e6-9a39-a1f2a6d11f80.png)

I would expect that the dollar amounts in `Col 2` would be right aligned, but they aren't.


Discussion:
I have the same Problem. Same Environment (Browser Safari and Mozilla)

I have the same/similar issue trying to center text using StringFormatter(). 

Setting text_align = "center" does not affect change
Not only do I have the same issue (i.e. `text_align` not working), but the default should be right aligned for numbers.

I know this issue seems trivial in importance, but this functionality is vital to be able to generate a professional looking result.
I have the same issue.
I have tried to right align both : 
- numerical values with the attribute `formatter=NumberFormatter(text_align='right')`
- strings with the attribute `formatter=StringFormatter(text_align='right')`
the values both numerics and strings remain left aligned. 

Here is my environment:

- Python: 3.4.3
- numpy==1.13.1
- pandas==0.19.1
- bokeh==0.12.9
- Ubuntu 14.04, Firefox 50.0.2

I have the same issue:
- python: 3.6.1
- bokeh==0.12.13
Good Morning,

I have posted the #7124 , that is closed becose is the same problem as this: #5721

Now is delivered the versione 0.13, but I don not found the fix of this bugs.

Have You any idea when is possible to fix this bugs?

Kind regards

Mauro Putzu
@mauropu I am unable to give you any firm answer. The core team has much more work than people to do it. The fastest way this likely be fixed is if a new contributor decides to work on it, we are always happy to provide guidance and help to to new contributors. 
It would be nice to be able to work on it.
Is there anything written, that does not waste your time, to understand the level of knowledge necessary to try to fix an error like this?



@mauropu first steps are to be able to build and run BokehJS locally, there is a dev set up guide here:

https://bokeh.pydata.org/en/latest/docs/dev_guide/setup.html

If you are on Windows, some information may be out of date there so please ask questions. Once, you are up and running, the JS implementation of this widgets is here:

https://github.com/bokeh/bokeh/blob/master/bokehjs/src/lib/models/widgets/tables/cell_formatters.ts

I'm not entirely sure what changes will be necessary, it may also be necessary to handle things somehow at the table column level as well:

https://github.com/bokeh/bokeh/blob/master/bokehjs/src/lib/models/widgets/tables/table_column.ts

Resolving patch:
diff --git a/examples/app/dash/main.py b/examples/app/dash/main.py
--- a/examples/app/dash/main.py
+++ b/examples/app/dash/main.py
@@ -6,7 +6,8 @@
 
 from bokeh.io import curdoc
 from bokeh.layouts import column
-from bokeh.models import ColumnDataSource, DataTable, RangeTool, TableColumn
+from bokeh.models import ColumnDataSource, DataTable, RangeTool, TableColumn, \
+                         NumberFormatter, StringFormatter
 from bokeh.palettes import Spectral11
 from bokeh.plotting import figure
 from bokeh.transform import cumsum
@@ -92,8 +93,10 @@
 source = ColumnDataSource(data=mpg[:6])
 columns = [
     TableColumn(field="cyl", title="Counts"),
-    TableColumn(field="cty", title="Uniques"),
-    TableColumn(field="hwy", title="Rating"),
+    TableColumn(field="cty", title="Uniques",
+                formatter=StringFormatter(text_align="center")),
+    TableColumn(field="hwy", title="Rating",
+                formatter=NumberFormatter(text_align="right")),
 ]
 table = DataTable(source=source, columns=columns, height=210, width=330, name="table", sizing_mode="scale_both")
 
diff --git a/examples/integration/widgets/data_table_customization.py b/examples/integration/widgets/data_table_customization.py
--- a/examples/integration/widgets/data_table_customization.py
+++ b/examples/integration/widgets/data_table_customization.py
@@ -1,5 +1,5 @@
 from bokeh.io import save
-from bokeh.models import ColumnDataSource
+from bokeh.models import ColumnDataSource, NumberFormatter, StringFormatter
 from bokeh.models.widgets import DataTable, TableColumn, HTMLTemplateFormatter
 
 from bokeh.sampledata.periodic_table import elements
@@ -14,8 +14,10 @@
 </a>
 """
 columns = [
-    TableColumn(field='atomic number', title='Atomic Number'),
-    TableColumn(field='symbol', title='Symbol'),
+    TableColumn(field='atomic number', title='Atomic Number',
+                formatter=NumberFormatter(text_align="right")),
+    TableColumn(field='symbol', title='Symbol',
+                formatter=StringFormatter(text_align="center")),
     TableColumn(field='name', title='Name',
                 formatter=HTMLTemplateFormatter(template=html_font_template)),
     TableColumn(field='name_lower', title='Image',


Test patch: