Geometry

In Vizzu you can set the geometric elements used to represent your data by the geometry property within the config object.

The first step is switching the geometry to area.

The second step is drawing a line chart.

The third step is switching the geometry to circle. This setting is the most useful when used together with the size channel, as shown in the next chapter of the tutorial.

The last step is switching the geometry to rectangle. Rectangle geometry is the default setting in Vizzu, used for most common charts like bar and column charts.

Note: The data used in this tutorial is available here. You can read more about the available types of data in the Adding data chapter.

In [1]:
from ipyvizzu import Chart, Data, Config

chart = Chart()

data = Data.from_json("./music_data.json")

chart.animate(data)

chart.animate(
    Config({"channels": {"y": {"set": "Popularity"}, "x": {"set": "Genres"}}})
)

chart.animate(Config({"title": "Geometry: area"}))

chart.animate(Config({"geometry": "area"}))

chart.animate(Config({"title": "Geometry: line"}))

chart.animate(Config({"geometry": "line"}))

chart.animate(Config({"title": "Geometry: circle"}))

chart.animate(Config({"geometry": "circle"}))

chart.animate(Config({"title": "Geometry: rectangle - default"}))

chart.animate(Config({"geometry": "rectangle"}))

Next chapter: Channels & legend ----- Previous chapter: Axes, title, tooltip ----- Back to the Table of contents