Question: So i want integer intervals between my y axis variables in my pygal graph. Here is my code:

```py
    graph = pygal.Line(min_scale=1,x_label_rotation=35, truncate_label=-1, no_data_text="", style=custom_style, width=1000, height=400, explicit_size=True)
    x_labels = []
    data = []
    for i in range(1,len(User.query.all())+1):
        data.append(i)
        x_labels.append(User.query.filter_by(id=i).first().date_created)
    graph.x_labels = x_labels
    graph.add("Count", data)

```

nevermind the User.query stuff since the .date\_created returns a datetime.
Anyway this graph returns this
[![enter image description here](https://i.stack.imgur.com/hy2dl.png)](https://i.stack.imgur.com/hy2dl.png)

I want the y intervals to say 1 and then 2, so I dont want any decimals

Answer: 
You can specify the position of y ticks by setting the `y_labels` attribute on the chart object.

For example:

```
graph = pygal.Line(min_scale=1, width=400, height=300)
graph.add("Count", [1, 1.5, 2])
graph.x_labels = ["A", "B", "C"]
graph.y_labels = [1, 2]

```

Which generates the following chart:

[![Pygal line chart with custom y ticks](https://i.stack.imgur.com/0P0I3.png)](https://i.stack.imgur.com/0P0I3.png)

Refer to the [docs](http://pygal.org/en/stable/documentation/configuration/label.html#y-labels) to see the various options.
Pygal doesn't seem to support this. I gave it integer values but it would draw a dozen horizontal lines and fractional values between 1 and 2. Setting `min_scale`, `max_scale`, or `order_min` (all options that seem remotely relevant) don't help. The only solution is to use what mostlyoxygen answered: explicitly specify which values should appear on the axis. I came up with a nice snippet create that list fairly easily, though:

```
chart.y_labels = list(range(max_y_value + 1))

```

* It needs +1 because the range is exclusive (`range(3)` generates `[0,1,2]`).
* Note that max\_y\_value must be of type `int`, e.g. even the result of `round()` is a float and will throw an error when passed to the range function. You can use `int(max_y_value)` if applicable, though that drops any decimals (effectively rounding down) while you'll probably want to round up.
* If you don't want the chart to start at zero (though beware that you might be making a misleading chart this way, since that exaggerates differences even when the value is fairly stable), you can pass the first value to the `range` function before the maximum.