Skip to content

Commit

Permalink
[fix](general) replace type by chart_name
Browse files Browse the repository at this point in the history
  • Loading branch information
areski committed Apr 18, 2024
1 parent 69d0ff8 commit 203c690
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests.py
Expand Up @@ -281,19 +281,19 @@ def test_bulletChart_marker_optional(self):

def test_charts_with_extras(self):
# extras="d3.selectAll('#mygraphname text').style('opacity', 0.5)"
type_bullet = 'bulletChart'
bullet_chart = bulletChart(name=chart_name_bullet, height=100, width=500, extras="d3.selectAll('#mygraphname text').style('opacity', 0.5)")
chart_name = 'bulletChart'
bullet_chart = bulletChart(name=chart_name, height=100, width=500, extras="d3.selectAll('#mygraphname text').style('opacity', 0.5)")
bullet_chart.buildhtml()
assert 'data_bulletchart' in bullet_chart.htmlcontent
assert "d3.selectAll('#mygraphname text').style('opacity', 0.5)" in bullet_chart.htmlcontent

type_pie = "pieChart"
pie_chart = pieChart(name=chart_name_pie, height=400, width=400, donut=True, donutRatio=0.2, extras="alert('Example of extra not even related to d3!')")
chart_name = "pieChart"
pie_chart = pieChart(name=chart_name, height=400, width=400, donut=True, donutRatio=0.2, extras="alert('Example of extra not even related to d3!')")
pie_chart.buildhtml()
assert "alert('Example of extra not even related to d3!')" in pie_chart.htmlcontent

type_line_plus_bar = "linePlusBarChart"
line_plus_bar_chart = linePlusBarChart(name=chart_name_line_plus_bar, date=True, height=350, extras="d3.selectAll('#mygraphname text').style('fill', 'red')")
chart_name = "linePlusBarChart"
line_plus_bar_chart = linePlusBarChart(name=chart_name, date=True, height=350, extras="d3.selectAll('#mygraphname text').style('fill', 'red')")
line_plus_bar_chart.buildhtml()
assert "d3.selectAll('#mygraphname text').style('fill', 'red')" in line_plus_bar_chart.htmlcontent

Expand Down

0 comments on commit 203c690

Please sign in to comment.