0

Is it possible to get alternating row/column colors in the grid?

see image of flash chart

Also, the grid lines in the old chart were exactly on the values, now the values lie exactly between the lines. Can this be changed?

flash chart

html5 chart

Thanks ahead.

7
  • Can you provide snippets or samples on AnyChart Playground that reproduces your issue in HTML5? The current version of AnyChart 8.7.1 works well with grids and provide deep customization. For details, check the following guide - docs.anychart.com/Axes_and_Grids/Axis_Basics#grids Commented Apr 27, 2020 at 3:03
  • Thank you for pointing that out. I found the setting for the alternating colors: chart.yMinorGrid().palette(...) does the trick. Now I still have the problem with the grid position. chart.xScale.mode('continuous') comes already a bit closer to what I want. The values are on the grid lines. But I want the mode 'discrete', with indentations on the sides and still the values should be on the grid. Like this: i.sstatic.net/lcQBE.png I can't figure out how to change the grid to make it fit. Here is the example in Playground: playground.anychart.com/cO6ebTmF Commented Apr 28, 2020 at 7:39
  • This is not possible using the Ordinal scale. Vertical grids separate categories of the Ordinal scale. If you will use linear xScale and numbers instead of category names then it will meet your requirements. Commented Apr 29, 2020 at 2:28
  • I don't quite see why that shouldn't be possible. I have created a better example, perhaps it will make it more clear what I mean. i.imgur.com/n47NtJY.png Thanks for your efforts. Commented Apr 29, 2020 at 7:11
  • Ordinal scale works with categories, not coordinates. Compare ordinal scale - playground.anychart.com/QuGEsn1q and Linear scale - playground.anychart.com/ePBrgbHQ. In your case, you are applying string names for categories. So, you can use only the Ordinal scale for that. And while using Ordinal scale vertical grids divides categories. Commented Apr 29, 2020 at 8:10

1 Answer 1

0

Just to answer the question.

Alternating colors can be done by adding a palette to the chart grid for example:

chart.yMinorGrid().palette(["#FFF 0.25", "#000 0.25"]);

Or look at the example in the anychart playground: https://playground.anychart.com/cO6ebTmF/0

The anychart flash setting tickmarks_placement="Center" is not supportet anymore as it does not meet the requirements of categorized charts.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.