Is there a way to set the tick don’t size on the bar chart? #1000
Replies: 2 comments
-
@ScriptKittiesShadow Thank you for using BlazorBootstrap. Please share a screenshot and sample code for better understanding. |
Beta Was this translation helpful? Give feedback.
-
I am basing this example off of the very nice documentation / Demos BlazorBootstrap provides, so hopefully it will look familiar. The Base Bar chart looks very nice: But when you add too many the tick labels start to get removed. For most things this is desired, but my production chart the labels are based on location, so I am wanting to make the labels smaller, so will show up without having to make the chart larger. I figured out how to change the font color, but wasn't able to figure out a way to set the ChartAxesTicks size like I can most of the other elements. There is a TextStrokeWidth attribute, but I am not sure what that affects. Here is the Code used for the control (Note: The Chart.js script is being called by the component instead of the global app.razor file so the script is only loaded when rendering the relevant controls. They have also been converted to local.) Chart.Razor code` @rendermode InteractiveServer <BarChart @ref="barChart" Width="500" Height="300" /> <script src="lib/chart.js/chart.umd.js"></script>` Charts .CS code`
} App.Razor code`
|
Beta Was this translation helpful? Give feedback.
-
Is there a way to set the don’t size of the bar chart ticks (the numbers/labels on the data axes)?
I am able to set the don’t color using barchartoptions.Scale.Y!.Ticks=new ChartAxesTicks {Color=“Red”}; and can change the other properties, but I can’t find a way of changing the font size of the ticks, and it’s causing some of the ticks to not render when doing a stacked bar chart.
I have found the size adjustments for most of the other components of the chart, but can’t find a way to set the ticks.
Beta Was this translation helpful? Give feedback.
All reactions