@@ -815,6 +815,51 @@ function rand() {
815815} ) ( ) ;
816816//////////////////////////////////////////////////////////////////////
817817
818+ //////////////////////////////////////////////////////////////////////
819+ // Plotly.validate
820+ ( ( ) => {
821+ const validateResult = Plotly . validate ( data , layout ) ;
822+ for ( let res of validateResult ) {
823+ console . log ( res . code , res . msg ) ;
824+ }
825+ } ) ( ) ;
826+ //////////////////////////////////////////////////////////////////////
827+
828+ //////////////////////////////////////////////////////////////////////
829+ // Plotly.setPlotConfig
830+ ( ( ) => {
831+ Plotly . setPlotConfig ( {
832+ locale : "en" ,
833+ logging : 1 ,
834+ } ) ;
835+ } ) ( ) ;
836+ //////////////////////////////////////////////////////////////////////
837+
838+ //////////////////////////////////////////////////////////////////////
839+ // Plotly.makeTemplate with div ID
840+ ( ( ) => {
841+ Plotly . makeTemplate ( graphDiv ) ;
842+ } ) ( ) ;
843+ //////////////////////////////////////////////////////////////////////
844+
845+ //////////////////////////////////////////////////////////////////////
846+ // Plotly.makeTemplate with {data, layout}
847+ ( ( ) => {
848+ Plotly . makeTemplate ( { data : data , layout : layout } ) ;
849+ } ) ( ) ;
850+ //////////////////////////////////////////////////////////////////////
851+
852+ //////////////////////////////////////////////////////////////////////
853+ // Plotly.validateTemplate
854+ ( ( ) => {
855+ const tmpl = Plotly . makeTemplate ( { data : data , layout : layout } ) ;
856+ const validateResult = Plotly . validateTemplate ( graphDiv , tmpl ) ;
857+ for ( const res of validateResult ) {
858+ console . log ( res . code , res . msg ) ;
859+ }
860+ } ) ( ) ;
861+ //////////////////////////////////////////////////////////////////////
862+
818863//////////////////////////////////////////////////////////////////////
819864// Using events
820865( async ( ) => {
0 commit comments