File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
graphic-builder/visualization/visualization-save
shared/chart/factories/echart-factory/charts Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ export class VisualizationSaveComponent implements OnInit {
3737
3838 ngOnInit ( ) {
3939 this . initFormSaveVis ( ) ;
40- cleanVisualizationData ( this . visualization ) . then ( visualization => {
40+ const visualizationPromise = this . visualization . chartType === ChartTypeEnum . TAG_CLOUD_CHART
41+ ? Promise . resolve ( this . visualization )
42+ : cleanVisualizationData ( this . visualization ) ;
43+
44+ visualizationPromise . then ( visualization => {
4145 this . visualizationToSave = visualization ;
4246 if ( this . mode === 'edit' ) {
4347 this . visSaveForm . get ( 'name' ) . setValue ( this . visualizationToSave . name ) ;
@@ -46,6 +50,7 @@ export class VisualizationSaveComponent implements OnInit {
4650 } ) ;
4751 }
4852
53+
4954 initFormSaveVis ( ) {
5055 this . visSaveForm = this . fb . group (
5156 {
Original file line number Diff line number Diff line change @@ -17,9 +17,12 @@ export class TagCloud implements ChartBuildInterface {
1717 buildChart ( data ?: any [ ] , visualization ?: VisualizationType ) : ChartOption {
1818 const tagOptions : UtmTagCloudOptionType = visualization . chartConfig ;
1919 tagOptions . series [ 0 ] . data = this . extractTagValues ( data , visualization ) ;
20- tagOptions . series [ 0 ] . name = visualization . queryLanguage === ChartBuilderQueryLanguageEnum . SQL ?
21- tagOptions . series [ 0 ] . name = data . length > 0 && data [ 0 ] . bucketId ? data [ 0 ] . bucketId : 'Count'
22- : getBucketLabel ( 0 , visualization ) ;
20+
21+ tagOptions . series [ 0 ] . name =
22+ visualization . queryLanguage === ChartBuilderQueryLanguageEnum . SQL
23+ ? ( data && data . length > 0 && data [ 0 ] . bucketId ? data [ 0 ] . bucketId : 'Count' )
24+ : getBucketLabel ( 0 , visualization ) ;
25+
2326 return tagOptions ;
2427 }
2528
You can’t perform that action at this time.
0 commit comments