Related to the question [Creating bar chart from point layer using QGIS Geometry Generator][1], I am using the expression proposed by user Taras (https://gis.stackexchange.com/users/99589/taras) in Solution 2:

    make_line(
        geometry_n(
                order_parts(
                    nodes_to_points(
                        densify_by_count(
                            make_line(
                                make_point(
                                        x_min(layer_property(@layer, 'extent')),
                                        y_min(layer_property(@layer, 'extent'))
                                        ),
                                make_point(
                                        x_max(layer_property(@layer, 'extent')),
                                        y_min(layer_property(@layer, 'extent'))
                                        )
                                )
                            ,
                            (layer_property(@layer, 'feature_count') - 2)
                            )
                        ),
                    orderby:="month"
                    ),
                array_find(array_agg($id, order_by:="month"), $id) + 1),
        project(
            geometry_n(
                order_parts(
                    nodes_to_points(
                        densify_by_count(
                            make_line(
                                make_point(
                                        x_min(layer_property(@layer, 'extent')),
                                        y_min(layer_property(@layer, 'extent'))
                                        ),
                                make_point(
                                        x_max(layer_property(@layer, 'extent')),
                                        y_min(layer_property(@layer, 'extent'))
                                        )
                                )
                            ,
                            (layer_property(@layer, 'feature_count') - 2)
                            )
                        ),
                    orderby:="month"
                    ),
                array_find(array_agg($id, order_by:="month"), $id) + 1),
            "temp",
            0
            )
        )

I note that the display of objects depends on the objects within the extent of the view. Thus, to see the whole graph, all point objects must be in extent view. In this screenshot, all the points within the view extent are shown and therefore the whole graph is displayed:

[![enter image description here][2]][2]

However, if I scroll the map up and hide some points (outside the map view extent), the graph is incomplete (some bars disappear):

[![enter image description here][3]][3]

I understand the cause of this effect, but is there a solution to prevent this? In other words, that the result of the Geometry Generator expression is kept in the view even if its original point object is outside the view extent?


  [1]: https://gis.stackexchange.com/questions/470937/creating-bar-chart-from-point-layer-using-qgis-geometry-generator
  [2]: https://i.sstatic.net/9m76g.jpg
  [3]: https://i.sstatic.net/NQ3jN.jpg