Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

196
Visualizações
Highcharts not displaying in a django app

I am trying to create data visualization dashboard in a django project am working on, i am using highchart js to achieve this.My problem is even after following the documentation, my data is not been displayed even as a simple line chart.I am sure am missing something, kindly need help.

my models

class Company(models.Model):
    name = models.CharField(max_length=100)
    phone = models.CharField(max_length=50)
    email = models.EmailField(max_length=75)
    city = models.ForeignKey(City)
    sector = models.ForeignKey(Sector)
    description = models.TextField()

    def __unicode__(self):
        return self.name

class Feedback(models.Model):
    PENDING,RESOLVED = range(2)
    FEEDBACK_STATUS = (
        (PENDING,'Pending'),
        (RESOLVED, 'Resolved'),
        )
    title = models.CharField(max_length=100)
    feed_back = models.TextField(verbose_name='feed back')
    date_posted = models.DateTimeField(verbose_name='date posted',auto_now_add=True)
    customer = models.ForeignKey(Customer)
    company = models.ForeignKey(Company)
   status = models.PositiveSmallIntegerField(null = True ,choices=FEEDBACK_STATUS, blank = True)
    # status = models.BooleanField(default=False)
    objects = FeedbackManager()

    def __unicode__(self):
        return self.title

views.py

def chart_data(request):
    """
    this model holds the data visualization datasets
    """
    company = Company.objects.get(pk=1)
    feedbacks = Feedback.objects.filter(company=company)
    feeds = feedbacks.count()
    return render_to_response('cfback/dashboard.html',RequestContext(request, {'company':company,
                                                                               'feeds':feeds}))

and on the template side i have the following code base.html https://codeshare.io/5w9wDD

and the dashboard.html is https://codeshare.io/5zlKvk

you'll note on the dashboard.html i am testing with on of the demo charts from highcharts and calling a variable from my model to test if anything is been displayed the rest are values from the demo app.

xAxis: {
        categories: [{{company}},{{company}},{{company}},{{company}},{{company}}],
        title: {
            text: null
        }

some kindly help to figure out what am missing, i have been on this for the last 2 days.I am almost giving up on highcharts and try something else. Thanks

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda