@@ -298,9 +298,9 @@ class ChartCard(blocks.StructBlock):
298298 required = False ,
299299 )
300300 date_prefix = blocks .CharBlock (
301- required = True ,
301+ requried = True ,
302302 default = CHART_CARD_DATE_PREFIX_DEFAULT_TEXT ,
303- help_text = help_texts .CHART_DATE_PREFIX ,
303+ help_texts = help_texts .CHART_DATE_PREFIX ,
304304 )
305305 show_timeseries_filter = blocks .BooleanBlock (
306306 help_text = help_texts .CHART_TIMESERIES_FILTER ,
@@ -314,7 +314,16 @@ class Meta:
314314 icon = "standalone_chart"
315315
316316
317- class ChartWithDescriptionCard (ChartCard ):
317+ class ChartWithDescriptionCard (blocks .StructBlock ):
318+ title = blocks .TextBlock (required = True , help_text = help_texts .TITLE_FIELD )
319+ sub_title = blocks .TextBlock (
320+ required = False , help_text = help_texts .OPTIONAL_BODY_FIELD , label = "Subtitle"
321+ )
322+ topic_page = PageLinkChooserBlock (
323+ page_type = "topic.TopicPage" ,
324+ required = True ,
325+ help_text = help_texts .TOPIC_PAGE_FIELD ,
326+ )
318327 description = blocks .TextBlock (
319328 required = True ,
320329 help_text = help_texts .CHART_DESCRIPTION ,
@@ -323,6 +332,47 @@ class ChartWithDescriptionCard(ChartCard):
323332 required = False ,
324333 help_text = help_texts .SOURCE_LINK_INTERNAL_OR_EXTERNAL ,
325334 )
335+ tag_manager_event_id = blocks .CharBlock (
336+ required = False ,
337+ help_text = help_texts .TAG_MANAGER_EVENT_ID_FIELD ,
338+ label = "Tag manager event ID" ,
339+ )
340+ x_axis = blocks .ChoiceBlock (
341+ required = False ,
342+ choices = get_possible_axis_choices ,
343+ help_text = help_texts .CHART_X_AXIS ,
344+ )
345+ x_axis_title = blocks .CharBlock (
346+ required = False ,
347+ default = "" ,
348+ help_text = help_texts .CHART_X_AXIS_TITLE ,
349+ )
350+ y_axis = blocks .ChoiceBlock (
351+ required = False ,
352+ choices = get_possible_axis_choices ,
353+ help_text = help_texts .CHART_Y_AXIS ,
354+ )
355+ y_axis_title = blocks .CharBlock (
356+ required = False ,
357+ default = "" ,
358+ help_text = help_texts .CHART_Y_AXIS_TITLE ,
359+ )
360+ y_axis_minimum_value = blocks .DecimalBlock (
361+ required = False ,
362+ default = 0 ,
363+ help_text = help_texts .CHART_Y_AXIS_MINIMUM_VALUE ,
364+ )
365+ y_axis_maximum_value = blocks .DecimalBlock (
366+ required = False ,
367+ help_text = help_texts .CHART_Y_AXIS_MAXIMUM_VALUE ,
368+ )
369+ show_tooltips = blocks .BooleanBlock (
370+ help_text = help_texts .SHOW_TOOLTIPS_ON_CHARTS_FIELD ,
371+ default = False ,
372+ required = False ,
373+ )
374+
375+ chart = ChartComponent (help_text = help_texts .CHART_BLOCK_FIELD )
326376
327377 class Meta :
328378 icon = "standalone_chart"
@@ -371,16 +421,52 @@ class Meta:
371421 icon = "standalone_chart"
372422
373423
374- class HeadlineChartWithDescriptionCard (HeadlineChartCard ):
424+ class HeadlineChartWithDescriptionCard (blocks .StructBlock ):
425+ title = blocks .TextBlock (required = True , help_text = help_texts .TITLE_FIELD )
426+ sub_title = blocks .TextBlock (
427+ required = False , help_text = help_texts .OPTIONAL_BODY_FIELD , label = "Subtitle"
428+ )
429+ topic_page = PageLinkChooserBlock (
430+ page_type = "topic.TopicPage" ,
431+ required = True ,
432+ help_text = help_texts .TOPIC_PAGE_FIELD ,
433+ )
375434 description = blocks .TextBlock (
376435 required = True ,
377436 help_text = help_texts .HEADLINE_CHART_DESCRIPTION ,
378437 )
438+ tag_manager_event_id = blocks .CharBlock (
439+ required = False ,
440+ help_text = help_texts .TAG_MANAGER_EVENT_ID_FIELD ,
441+ label = "Tag manager event ID" ,
442+ )
443+ x_axis = blocks .ChoiceBlock (
444+ required = True ,
445+ choices = get_possible_axis_choices ,
446+ help_text = help_texts .REQUIRED_CHART_X_AXIS ,
447+ )
448+ x_axis_title = blocks .CharBlock (
449+ required = False ,
450+ default = "" ,
451+ help_text = help_texts .CHART_X_AXIS_TITLE ,
452+ )
453+ y_axis_title = blocks .CharBlock (
454+ required = False ,
455+ default = "" ,
456+ help_text = help_texts .CHART_Y_AXIS_TITLE ,
457+ )
458+ show_tooltips = blocks .BooleanBlock (
459+ help_text = help_texts .SHOW_TOOLTIPS_ON_CHARTS_FIELD ,
460+ default = False ,
461+ required = False ,
462+ )
379463 source = SourceLinkBlock (
380464 required = False ,
381465 help_text = help_texts .SOURCE_LINK_INTERNAL_OR_EXTERNAL ,
382466 )
383467
468+ chart = HeadlineChartComponent (help_texts = help_texts .CHART_BLOCK_FIELD )
469+
384470 class Meta :
385471 icon = "standalone_chart"
386472
@@ -494,7 +580,6 @@ class ChartRowBlockTypes(blocks.StreamBlock):
494580 chart_card = ChartCard ()
495581 chart_with_description_card = ChartWithDescriptionCard ()
496582 headline_chart_card = HeadlineChartCard ()
497- headline_chart_with_description_card = HeadlineChartWithDescriptionCard ()
498583 chart_with_headline_and_trend_card = ChartWithHeadlineAndTrendCard ()
499584 simplified_chart_with_link = SimplifiedChartWithLink ()
500585 dual_category_chart_card = DualCategoryChartCard ()
@@ -555,7 +640,6 @@ class Meta:
555640
556641
557642class ChartCardSection (blocks .StructBlock ):
558-
559643 cards = ChartRowBlockTypes (
560644 min_num = MINIMUM_COLUMNS_CHART_COLUMNS_COUNT ,
561645 help_text = help_texts .CHART_ROW_CARD_COLUMN_WIDTH_THREE ,
0 commit comments