diff --git a/docs/Makefile b/docs/Makefile index 1406ced..7e0ed27 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,75 +15,75 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: - -rm -rf $(BUILDDIR)/* + -rm -rf $(BUILDDIR)/* html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/svgcharts.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/svgcharts.qhc" + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/svgcharts.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/svgcharts.qhc" latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/make.bat b/docs/make.bat index 89820bf..c975427 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -6,108 +6,108 @@ set SPHINXBUILD=sphinx-build set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end ) if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end ) if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end ) if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end ) if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - echo. - echo.Build finished; now you can process the pickle files. - goto end + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + echo. + echo.Build finished; now you can process the pickle files. + goto end ) if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - echo. - echo.Build finished; now you can process the JSON files. - goto end + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + echo. + echo.Build finished; now you can process the JSON files. + goto end ) if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. - goto end + goto end ) if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\svgcharts.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\svgcharts.ghc - goto end + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\svgcharts.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\svgcharts.ghc + goto end ) if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end ) if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end ) if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - echo. - echo.Link check complete; look for any errors in the above output ^ + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + echo. + echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. - goto end + goto end ) if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - echo. - echo.Testing of doctests in the sources finished, look at the ^ + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + echo. + echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. - goto end + goto end ) :end diff --git a/pygal/__init__.py b/pygal/__init__.py index ed10788..b7edb31 100644 --- a/pygal/__init__.py +++ b/pygal/__init__.py @@ -1,5 +1,5 @@ #!python -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- """ pygal package. diff --git a/pygal/bar.css b/pygal/bar.css index 6088eea..321b9a2 100644 --- a/pygal/bar.css +++ b/pygal/bar.css @@ -5,74 +5,79 @@ default fill styles for multiple datasets (probably only use a single dataset on this graph though) */ .key1,.fill1{ - fill: #ff0000; - fill-opacity: 0.5; - stroke: none; - stroke-width: 0.5px; + fill: #ff0000; + fill-opacity: 0.5; + stroke: none; + stroke-width: 0.5; + +} +.key1,.fill1:hover{ + fill-opacity: 0.25; + -webkit-transition: 250ms; } .key2,.fill2{ - fill: #0000ff; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #0000ff; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key3,.fill3{ - fill: #00ff00; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #00ff00; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key4,.fill4{ - fill: #ffcc00; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #ffcc00; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key5,.fill5{ - fill: #00ccff; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #00ccff; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key6,.fill6{ - fill: #ff00ff; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #ff00ff; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key7,.fill7{ - fill: #00ffff; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #00ffff; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key8,.fill8{ - fill: #ffff00; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #ffff00; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key9,.fill9{ - fill: #cc6666; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #cc6666; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key10,.fill10{ - fill: #663399; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #663399; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key11,.fill11{ - fill: #339900; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #339900; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } .key12,.fill12{ - fill: #9966FF; - fill-opacity: 0.5; - stroke: none; - stroke-width: 1px; + fill: #9966FF; + fill-opacity: 0.5; + stroke: none; + stroke-width: 1px; } diff --git a/pygal/graph.css b/pygal/graph.css index 1771ade..d2badf1 100644 --- a/pygal/graph.css +++ b/pygal/graph.css @@ -8,7 +8,7 @@ Base styles for pygal.Graph fill:#ffffff; } .graphBackground{ - fill:#f0f0f0; + fill:#ffffff; } /* graphs titles */ @@ -33,7 +33,7 @@ Base styles for pygal.Graph } .guideLines{ - stroke: #666666; + stroke: #eee; stroke-width: 1px; stroke-dasharray: 5,5; } @@ -44,6 +44,7 @@ Base styles for pygal.Graph font-size: %(x_label_font_size)dpx; font-family: "Arial", sans-serif; font-weight: normal; + transform: rotate(45deg); } .yAxisLabels{ @@ -71,17 +72,21 @@ Base styles for pygal.Graph } .dataPointLabel{ - fill: #000000; + fill: transparent; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; } +.dataPointLabel:hover{ + fill: #000000; +} + .staggerGuideLine{ fill: none; stroke: #000000; - stroke-width: 0.5px; + stroke-width: 0.5px; } .keyText{ @@ -90,4 +95,4 @@ Base styles for pygal.Graph font-size: %(key_font_size)dpx; font-family: "Arial", sans-serif; font-weight: normal; -} \ No newline at end of file +} diff --git a/pygal/pie.css b/pygal/pie.css index b123e73..26ed4ed 100644 --- a/pygal/pie.css +++ b/pygal/pie.css @@ -3,83 +3,83 @@ $Id$ */ .dataPointLabel{ - fill: #000000; - text-anchor:middle; - font-size: %(datapoint_font_size)spx; - font-family: "Arial", sans-serif; - font-weight: normal; + fill: #000000; + text-anchor:middle; + font-size: %(datapoint_font_size)spx; + font-family: "Arial", sans-serif; + font-weight: normal; } /* key - MUST match fill styles */ .key1,.fill1{ - fill: #ff0000; - fill-opacity: 0.7; - stroke: none; - stroke-width: 1px; + fill: #ff0000; + fill-opacity: 0.7; + stroke: none; + stroke-width: 1px; } .key2,.fill2{ - fill: #0000ff; - fill-opacity: 0.7; - stroke: none; - stroke-width: 1px; + fill: #0000ff; + fill-opacity: 0.7; + stroke: none; + stroke-width: 1px; } .key3,.fill3{ - fill-opacity: 0.7; - fill: #00ff00; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #00ff00; + stroke: none; + stroke-width: 1px; } .key4,.fill4{ - fill-opacity: 0.7; - fill: #ffcc00; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #ffcc00; + stroke: none; + stroke-width: 1px; } .key5,.fill5{ - fill-opacity: 0.7; - fill: #00ccff; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #00ccff; + stroke: none; + stroke-width: 1px; } .key6,.fill6{ - fill-opacity: 0.7; - fill: #ff00ff; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #ff00ff; + stroke: none; + stroke-width: 1px; } .key7,.fill7{ - fill-opacity: 0.7; - fill: #00ff99; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #00ff99; + stroke: none; + stroke-width: 1px; } .key8,.fill8{ - fill-opacity: 0.7; - fill: #ffff00; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #ffff00; + stroke: none; + stroke-width: 1px; } .key9,.fill9{ - fill-opacity: 0.7; - fill: #cc6666; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #cc6666; + stroke: none; + stroke-width: 1px; } .key10,.fill10{ - fill-opacity: 0.7; - fill: #663399; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #663399; + stroke: none; + stroke-width: 1px; } .key11,.fill11{ - fill-opacity: 0.7; - fill: #339900; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #339900; + stroke: none; + stroke-width: 1px; } .key12,.fill12{ - fill-opacity: 0.7; - fill: #9966FF; - stroke: none; - stroke-width: 1px; + fill-opacity: 0.7; + fill: #9966FF; + stroke: none; + stroke-width: 1px; } diff --git a/pygal/plot.css b/pygal/plot.css index 685b05b..a1525cb 100644 --- a/pygal/plot.css +++ b/pygal/plot.css @@ -4,186 +4,186 @@ $Id$ default line styles */ .line1{ - fill: none; - stroke: #ff0000; - stroke-width: 1px; + fill: none; + stroke: #ff0000; + stroke-width: 1px; } .line2{ - fill: none; - stroke: #0000ff; - stroke-width: 1px; + fill: none; + stroke: #0000ff; + stroke-width: 1px; } .line3{ - fill: none; - stroke: #00ff00; - stroke-width: 1px; + fill: none; + stroke: #00ff00; + stroke-width: 1px; } .line4{ - fill: none; - stroke: #ffcc00; - stroke-width: 1px; + fill: none; + stroke: #ffcc00; + stroke-width: 1px; } .line5{ - fill: none; - stroke: #00ccff; - stroke-width: 1px; + fill: none; + stroke: #00ccff; + stroke-width: 1px; } .line6{ - fill: none; - stroke: #ff00ff; - stroke-width: 1px; + fill: none; + stroke: #ff00ff; + stroke-width: 1px; } .line7{ - fill: none; - stroke: #00ffff; - stroke-width: 1px; + fill: none; + stroke: #00ffff; + stroke-width: 1px; } .line8{ - fill: none; - stroke: #ffff00; - stroke-width: 1px; + fill: none; + stroke: #ffff00; + stroke-width: 1px; } .line9{ - fill: none; - stroke: #cc6666; - stroke-width: 1px; + fill: none; + stroke: #cc6666; + stroke-width: 1px; } .line10{ - fill: none; - stroke: #663399; - stroke-width: 1px; + fill: none; + stroke: #663399; + stroke-width: 1px; } .line11{ - fill: none; - stroke: #339900; - stroke-width: 1px; + fill: none; + stroke: #339900; + stroke-width: 1px; } .line12{ - fill: none; - stroke: #9966FF; - stroke-width: 1px; + fill: none; + stroke: #9966FF; + stroke-width: 1px; } /* default fill styles */ .fill1{ - fill: #cc0000; - fill-opacity: 0.2; - stroke: none; + fill: #cc0000; + fill-opacity: 0.2; + stroke: none; } .fill2{ - fill: #0000cc; - fill-opacity: 0.2; - stroke: none; + fill: #0000cc; + fill-opacity: 0.2; + stroke: none; } .fill3{ - fill: #00cc00; - fill-opacity: 0.2; - stroke: none; + fill: #00cc00; + fill-opacity: 0.2; + stroke: none; } .fill4{ - fill: #ffcc00; - fill-opacity: 0.2; - stroke: none; + fill: #ffcc00; + fill-opacity: 0.2; + stroke: none; } .fill5{ - fill: #00ccff; - fill-opacity: 0.2; - stroke: none; + fill: #00ccff; + fill-opacity: 0.2; + stroke: none; } .fill6{ - fill: #ff00ff; - fill-opacity: 0.2; - stroke: none; + fill: #ff00ff; + fill-opacity: 0.2; + stroke: none; } .fill7{ - fill: #00ffff; - fill-opacity: 0.2; - stroke: none; + fill: #00ffff; + fill-opacity: 0.2; + stroke: none; } .fill8{ - fill: #ffff00; - fill-opacity: 0.2; - stroke: none; + fill: #ffff00; + fill-opacity: 0.2; + stroke: none; } .fill9{ - fill: #cc6666; - fill-opacity: 0.2; - stroke: none; + fill: #cc6666; + fill-opacity: 0.2; + stroke: none; } .fill10{ - fill: #663399; - fill-opacity: 0.2; - stroke: none; + fill: #663399; + fill-opacity: 0.2; + stroke: none; } .fill11{ - fill: #339900; - fill-opacity: 0.2; - stroke: none; + fill: #339900; + fill-opacity: 0.2; + stroke: none; } .fill12{ - fill: #9966FF; - fill-opacity: 0.2; - stroke: none; + fill: #9966FF; + fill-opacity: 0.2; + stroke: none; } /* default line styles */ .key1,.dataPoint1{ - fill: #ff0000; - stroke: none; - stroke-width: 1px; + fill: #ff0000; + stroke: none; + stroke-width: 1px; } .key2,.dataPoint2{ - fill: #0000ff; - stroke: none; - stroke-width: 1px; + fill: #0000ff; + stroke: none; + stroke-width: 1px; } .key3,.dataPoint3{ - fill: #00ff00; - stroke: none; - stroke-width: 1px; + fill: #00ff00; + stroke: none; + stroke-width: 1px; } .key4,.dataPoint4{ - fill: #ffcc00; - stroke: none; - stroke-width: 1px; + fill: #ffcc00; + stroke: none; + stroke-width: 1px; } .key5,.dataPoint5{ - fill: #00ccff; - stroke: none; - stroke-width: 1px; + fill: #00ccff; + stroke: none; + stroke-width: 1px; } .key6,.dataPoint6{ - fill: #ff00ff; - stroke: none; - stroke-width: 1px; + fill: #ff00ff; + stroke: none; + stroke-width: 1px; } .key7,.dataPoint7{ - fill: #00ffff; - stroke: none; - stroke-width: 1px; + fill: #00ffff; + stroke: none; + stroke-width: 1px; } .key8,.dataPoint8{ - fill: #ffff00; - stroke: none; - stroke-width: 1px; + fill: #ffff00; + stroke: none; + stroke-width: 1px; } .key9,.dataPoint9{ - fill: #cc6666; - stroke: none; - stroke-width: 1px; + fill: #cc6666; + stroke: none; + stroke-width: 1px; } .key10,.dataPoint10{ - fill: #663399; - stroke: none; - stroke-width: 1px; + fill: #663399; + stroke: none; + stroke-width: 1px; } .key11,.dataPoint11{ - fill: #339900; - stroke: none; - stroke-width: 1px; + fill: #339900; + stroke: none; + stroke-width: 1px; } .key12,.dataPoint12{ - fill: #9966FF; - stroke: none; - stroke-width: 1px; + fill: #9966FF; + stroke: none; + stroke-width: 1px; } .constantLine{ color: navy; diff --git a/tests/testing.rb b/tests/testing.rb index fd6e117..06af1dc 100644 --- a/tests/testing.rb +++ b/tests/testing.rb @@ -2,12 +2,12 @@ require 'SVG/Graph/Graph' require 'SVG/Graph/Plot' g = SVG::Graph::Plot.new( { - :min_x_value=>0, - :min_y_value=>0, - :area_fill=> true, - :stagger_x_labels=>true, - :stagger_y_labels=>true, - :show_x_guidelines=>true, + :min_x_value=>0, + :min_y_value=>0, + :area_fill=> true, + :stagger_x_labels=>true, + :stagger_y_labels=>true, + :show_x_guidelines=>true, }) g.add_data( { :data=>[ 1, 25, 2, 30, 3, 45 ], :title=>'series 1' } ) @@ -23,11 +23,11 @@ f.close() require 'SVG/Graph/TimeSeries' g = SVG::Graph::TimeSeries.new( { - :timescale_divisions => '4 hours', - :stagger_x_labels => true, - :x_label_format => '%d-%b %H:%M', - :max_y_value => 200, - } ) + :timescale_divisions => '4 hours', + :stagger_x_labels => true, + :x_label_format => '%d-%b %H:%M', + :max_y_value => 200, + } ) g.add_data( { :data=> [ '2005-12-21T00:00:00', 20, '2005-12-22T00:00:00', 21 ], :title=> 'series 1' } ) res = g.burn() @@ -41,14 +41,14 @@ require 'SVG/Graph/Bar' fields = ['Internet', 'TV', 'Newspaper', 'Magazine', 'Radio'] g = SVG::Graph::Bar.new( { - :scale_integers=>true, - :stack=>:side, - :width=>640, - :height=>480, - :fields=>fields, - :graph_title=>'Question 7', - :show_graph_title=>true, - :no_css=>false + :scale_integers=>true, + :stack=>:side, + :width=>640, + :height=>480, + :fields=>fields, + :graph_title=>'Question 7', + :show_graph_title=>true, + :no_css=>false }) g.add_data({:data=>[-2,3,1,3,1], :title=>'Female'}) @@ -61,14 +61,14 @@ f.close() require 'SVG/Graph/BarHorizontal' g = SVG::Graph::BarHorizontal.new( { - :scale_integers=>true, - :stack=>:side, - :width=>640, - :height=>480, - :fields=>fields, - :graph_title=>'Question 7', - :show_graph_title=>true, - :no_css=>false + :scale_integers=>true, + :stack=>:side, + :width=>640, + :height=>480, + :fields=>fields, + :graph_title=>'Question 7', + :show_graph_title=>true, + :no_css=>false }) g.add_data({:data=>[-2,3,1,3,1], :title=>'Female'}) @@ -79,14 +79,14 @@ f.write(g.burn()) f.close() g = SVG::Graph::Bar.new({ - :scale_integers=>true, - :stack=>:side, - :width=>640, - :height=>480, - :fields=>fields, - :graph_title=>'Question 8', - :show_graph_title=>true, - :no_css=>false, + :scale_integers=>true, + :stack=>:side, + :width=>640, + :height=>480, + :fields=>fields, + :graph_title=>'Question 8', + :show_graph_title=>true, + :no_css=>false, }) g.add_data({:data=>[2,22,98,143,82], :title=>'intermediate'}) @@ -99,12 +99,12 @@ f.close() require 'SVG/Graph/Pie' g = SVG::Graph::Pie.new({ - :width=>640, - :height=>480, - :fields=>fields, - :graph_title=>'Question 7', - :expand_greatest=>true, - :show_data_labels=>true, + :width=>640, + :height=>480, + :fields=>fields, + :graph_title=>'Question 7', + :expand_greatest=>true, + :show_data_labels=>true, }) g.add_data({:data=>[-2,3,1,3,1], :title=>'Female'}) @@ -116,14 +116,14 @@ f.close() require 'SVG/Graph/Line' g = SVG::Graph::Line.new( { - :scale_integers=>true, - :area_fill=>true, - :width=>640, - :height=>480, - :fields=>fields, - :graph_title=>'Question 7', - :show_graph_title=>true, - :no_css=>false + :scale_integers=>true, + :area_fill=>true, + :width=>640, + :height=>480, + :fields=>fields, + :graph_title=>'Question 7', + :show_graph_title=>true, + :no_css=>false }) g.add_data({:data=>[-2,3,1,3,1], :title=>'Female'}) @@ -145,7 +145,7 @@ data1 = [ ] title2 = "Another Schedule" data2 = [ - "Just one period", "5/19/04", "6/30/04" + "Just one period", "5/19/04", "6/30/04" ] g = SVG::Graph::Schedule.new( { @@ -178,8 +178,8 @@ g.add_data( :title => "Data" ) g.add_data( - :data => data2, - :title => title2 + :data => data2, + :title => title2 ) f = File.new('Schedule.rb.svg', 'w')