Add data availability chart view using Apache ECharts in article app#1400
Draft
Add data availability chart view using Apache ECharts in article app#1400
Conversation
- Create article/views.py with data_availability_chart view - Create article/templates/article/data_availability_chart.html template - Register admin URL in article/wagtail_hooks.py - Add tests in article/tests.py Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add data representation visualization to article app
Add data availability chart view using Apache ECharts in article app
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que esse PR faz?
Adiciona uma visualização na app article com um gráfico de barras empilhadas (Apache ECharts) mostrando a evolução anual dos artigos por status de disponibilidade de dados (
data_availability_status×pub_date_year).Acessível em
/admin/article/data-availability-chart/(requer autenticação).Onde a revisão poderia começar?
article/views.py— viewdata_availability_chartque agrega os dados via ORM (values+annotate(Count)).Como este poderia ser testado manualmente?
/admin/article/data-availability-chart/logado no Wagtail adminDATA_AVAILABILITY_STATUSaparece como uma série no stackAlgum cenário de contexto que queira dar?
Article.pub_date_yeareArticle.data_availability_status(ambos indexados)@hooks.register("register_admin_urls"), seguindo o padrão existente emlocation/edjango_celery_beat/echarts@5), consistente com o padrão do projeto para scripts externos (Google reCAPTCHA, cookiePolicy)Arquivos alterados:
article/views.py— view com query agregada e serialização JSONarticle/templates/article/data_availability_chart.html— template com ECharts (extendswagtailadmin/base.html)article/wagtail_hooks.py— registro da URL admin via hookarticle/tests.py— testes para autenticação, resposta, contexto, template e DB vazioScreenshots
N/A (requer dados no banco para renderizar o gráfico)
Quais são tickets relevantes?
Referências
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.jsdelivr.net/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)/usr/bin/curl curl -sI REDACTED conntrack --ctstate INVALID,NEW -j DROP /home/REDACTED/worgit /home/REDACTED/wor--git-dir /home/REDACTED/wor/tmp/pip-req-build-n5pk_o15/.git bash --no��(dns block)/usr/bin/curl curl -sI --max-time 10 REDACTED -2.15.1.3-py3.12/usr/include/python3.12 grep al/local/bin/gitx86_64-linux-gnu ew\|ViewSet ex.html rgo/bin/grep cat /hom��(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.