Team, I have a table called Indicators. This includes indicator, target and progress. Both target and progress are numbers. What I want is to display a chart target and progress for every indicator. With the code below I only get indicators I failed to display the bars (columns). Please assist
[image: image.png] def chart(request): dataset = Indicators.objects.values('indicator','target','progress') indicator = list() target = list() progress = list() for entry in dataset: indicator.append(entry['indicator']) target.append(entry['target']) progress.append(entry['progress']) target_series = { 'name': 'Target', 'data': target, 'color': 'blue', } progress_series = { 'name': 'Progress', 'data': progress, 'color': 'red' } chart = { 'chart': {'type': 'column'}, 'title': {'text': 'Indicator Analysis'}, 'xAxis': {'categories': indicator}, 'series': [target_series,progress_series] } dump = json.dumps(chart) -- *Eugene* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHtqCB2n%3D0FYAKinTcujUsosHkyHTSUS2%3DFML0-7pLjKsg%40mail.gmail.com.