We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to get the donut to respond to colors via the code below without success:
class ThresholdFactorsView(BaseAthleteView): template_name = 'factors.html'
def get_context_data(self, **kwargs): context = super(ThresholdFactorsView, self).get_context_data(**kwargs) factors_list = self.client.get_threshold_factors() chart_data, chart_colors = self.build_feature_data(factors_list) threshold_data_source = SimpleDataSource(data=chart_data) threshold_factors_chart = DonutChart(data_source=threshold_data_source, options={'colors': chart_colors}) context['factors_chart'] = threshold_factors_chart context['slug'] = 'factors' return context def build_feature_data(self, factors_list): colors = [] rval = [['label','value']] for row in factors_list: feature = row['feature'] coef = row['coef'] color = "#008000" if coef < 0: color = "#FF0000" rval.append([feature, abs(coef)]) colors.append(color) return rval, colors
I have a fix for it if you'd like me to send it along...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to get the donut to respond to colors via the code below without success:
class ThresholdFactorsView(BaseAthleteView):
template_name = 'factors.html'
I have a fix for it if you'd like me to send it along...
The text was updated successfully, but these errors were encountered: