Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!