Forum Discussion

AmitDevkatte's avatar
AmitDevkatte
Kudo Commander
6 months ago
Solved

Pie chart issue in pyspark notebook

Hello Everyone,

 

I was exploring below sales data in pyspark notebook after converting the panda df to pyspark df.

 

 

I wanted to explore the data through some chart. when I chose Pie chart , dispite different chart type the chart setting is not customising itself, I mean having the same field like x-axis, y-axis which is relevent with barchart or column chart.

It also giving me two pie chart.I tried different field selection but seems weird. 

Am I missing something here? Need your experties please. Thank you.

 

Regards,

Amit Devkatte

 

  • Hey Amit,

     

    It’s actually the Series group setting causing the double charts.


    You have Qty selected there, so it’s trying to split the view and create a separate pie for every quantity.

    Just clear the Series group field (leave it empty) and you’ll get a single chart.
    For the mapping confusion:
    - Xaxis = Legend (CityId)
    - Yaxis = Values (Qty)


    If you find the notebook charts limiting, you can create a Visual Query from your Lakehouse explorer. It gives you a full drag-and-drop interface to build your charts without coding!

    (Just remember to save your DataFrame as a table first, otherwise the Visual Query editor won’t pick it up).

     

    Let me know if that works. If it does, a Kudo and marking as Solved would be appreciated!

     

    QuentinGa

3 Replies

  • Hey Amit,

     

    It’s actually the Series group setting causing the double charts.


    You have Qty selected there, so it’s trying to split the view and create a separate pie for every quantity.

    Just clear the Series group field (leave it empty) and you’ll get a single chart.
    For the mapping confusion:
    - Xaxis = Legend (CityId)
    - Yaxis = Values (Qty)


    If you find the notebook charts limiting, you can create a Visual Query from your Lakehouse explorer. It gives you a full drag-and-drop interface to build your charts without coding!

    (Just remember to save your DataFrame as a table first, otherwise the Visual Query editor won’t pick it up).

     

    Let me know if that works. If it does, a Kudo and marking as Solved would be appreciated!

     

    QuentinGa

    • AmitDevkatte's avatar
      AmitDevkatte
      Kudo Commander

      Thank you so much for taking time to respond  for the solution. I will try tomorrow and let you know the outcome. 

      Regards,

      Amit Devkatte