Charts Problems

Hello,

I want to use charts in my new site.
I have installed charts module and C3 Charts and Google Charts

I tried it and followed two tutorials and it does not show any chart.
I even used Charts Block and no chart is shown.

I installed easy chart and simple chart modules, non of them show any chart.

Not even the Charts API Example shows a single chart.

How to display headers for sorted field

I have a content type with a year field and I'm sorting on that year field in my view.

What I would like to accomplish is to display something like

2020

a

b

2019

c

Where a/b are content with year 2020 and c is content with year 2019

Is this possible?

How to get alt tag in media.html.twig?

In media.html.twig I can use the following variables: 

  • name: Name of the media
  • content: Media content.

Then if I select the format option "URL to image" in "/admin/structure/media/manage/vector_illustration/display/content" then I get the image url just with:

{{ content.field_media_image }}

But how I get the alt tag of this image? I tried 

{{ content.field_media_image.alt }}

or

Updating Drupal 8.8.6 Devel Kint error

I updating Drupal 8.8.6 when I logged in to admin. I got this error on Devel Kint modules. Any advice on how to fix this?

The website encountered an unexpected error. Please try again later.
Error: Class 'Kint' not found in Drupal\devel\Plugin\Devel\Dumper\Kint->configure() (line 34 of modules/devel/src/Plugin/Devel/Dumper/Kint.php). 

Display Multiselect field in Twig Drupal 8

Hello

 I have created a multiselect field on user form settings, so the user can select more than one value.

 The idea is to show this via code, not views, sorry, i have a custom module working.

 I have tried like this:

$getValues[] = array();

$getValues = $user->field_type->value;

foreach ($getValues as $getValue) {

print_r($getValue);

}

Create a view of fields from two or more entity types based on common taxonomy terms

I prefer to give an example. I am having some articles (entity type: node) and some products (entity type: products). Each entity type has a taxonomy term field sharing common terms. What i am trying to do is having a view for each term, where articles and products will be displayed.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x