File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 44
55from os .path import abspath , isdir , join
66from json import dump
7- from altair import Chart
7+ from altair import Chart , Theta , Color
88from pandas import DataFrame
99
1010
@@ -110,15 +110,20 @@ def export_vers_html_camembert(self,
110110 # Exportation
111111 try :
112112 chemin_fichier = join (self ._chemin_sortie , nom_fichier )
113- camembert = Chart (axes ). mark_arc ( ).encode (
114- theta = 'y:Q' ,
115- color = 'x:N' ,
113+ base = Chart (axes ).encode (
114+ theta = Theta ( field = "y" , type = "quantitative" ) ,
115+ color = Color ( field = "x" , type = "nominal" ) ,
116116 tooltip = ['x:N' , 'y:Q' ]
117117 )
118- camembert .save (chemin_fichier )
118+ camembert = base .mark_arc (outerRadius = 200 )
119+ graphique = (camembert ).properties (
120+ width = 400 ,
121+ height = 400
122+ )
123+ graphique .save (chemin_fichier )
119124 except Exception as ex :
120125 raise ExportationCamembertHtmlException ("Erreur lors de l'exportation "
121- f"du camembert { nom_fichier } ." ) from ex
126+ f"du camembert { nom_fichier } { ex } ." ) from ex
122127
123128
124129class ExportationException (Exception ):
You can’t perform that action at this time.
0 commit comments