How to show labels on x axis for each element?

Piotr Perak

I have sequence of tuples containing filename and number.

I want to draw column graph where on X axis I have filenames.

My problem is that now only 3 labels (filenames) are shown under X axis. That's probably because more can't fit on screen. Or maybe X axis interval is wrong?

How to make chart display all filenames? Maybe there is a way to rotate those labels 90 degrees counterclockwise to make room for more labels?

DaveShaw

You should be able to use:

|> Chart.WithXAxis (LabelStyle = ChartTypes.LabelStyle(Angle = -45, Interval = 1.0))

The angle of -45 gives a nice slope and the interval of 1.0 means nothing is excluded.

Here's a proof of concept I knocked up in FSI:

#load "C:/Somewhere/packages/FSharp.Charting.0.90.7/FSharp.Charting.fsx"
open FSharp.Charting;;

let data = 
    [
        ("Foo.jpg", 12)
        ("Bar.jpg", 22)
        ("Another.doc", 8)
        ("OneMore.txt", 15)
        ("LastOne.txt", 17)
        ("ReallyLastOne.txt", 6)
        ("Foo.jpg", 12)
        ("Bar.jpg", 22)
        ("Another.doc", 8)
        ("OneMore.txt", 15)
        ("LastOne.txt", 17)
        ("ReallyLastOne.txt", 6)
    ];;

    data
    |> Chart.Line
    |> Chart.WithXAxis (LabelStyle = ChartTypes.LabelStyle(Angle = -45, Interval = 1.0))
    ;;

enter image description here

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How to add more x-axis labels make population pyramid with ggplot? R

분류에서Dev

How tick labels on one of the plot's axis can be multiplied in MATLAB?

분류에서Dev

Find .offset of each element with X class

분류에서Dev

How to shrink plot on x-axis in matplotlib?

분류에서Dev

How to move Date under X axis?

분류에서Dev

Two different x axis labels on line chart, chart.js react

분류에서Dev

Flutter how to have several cross axis alignment for each child in row

분류에서Dev

How to remove text in an element but show its children

분류에서Dev

How to skip first element in each line of matrix?

분류에서Dev

Polymer: How to show a DOM element not decleared in the custom/core element definition?

분류에서Dev

X,Y axis skew line how go up/down/sides

분류에서Dev

Excel chart: How to reverse the X axis of time series data

분류에서Dev

How to set maximum x-axis value for HorizontalBarChart?

분류에서Dev

How to change CSS background-position for the X axis only?

분류에서Dev

How to tell Excel to plot one column on x axis and another column on vertical axis?

분류에서Dev

How to show window after pressing X

분류에서Dev

Adjust labels of second Y axis on the right of the plot

분류에서Dev

Place axis text labels between ticks

분류에서Dev

Teechart Axis Item Modification of X axis Item

분류에서Dev

How can i add id's and add labels to each checkbox dynamically

분류에서Dev

How to force an input html element to show only the last inputted character

분류에서Dev

How to show part of element from other side of canvas

분류에서Dev

Highcharts. Is it possible to show data labels programmatically

분류에서Dev

How do I get the textfields and the labels to sit in a 7x3 grid?

분류에서Dev

How to return an element value from one branch based on an element value while in a for-each loop

분류에서Dev

Labels on the same line, not under each other

분류에서Dev

R universal distance between plot limits and axis labels/title

분류에서Dev

Google Charts - How to stretch x axis over chart's full width

분류에서Dev

How to spcify ticks on x axis for time scale in d3js?

Related 관련 기사

  1. 1

    How to add more x-axis labels make population pyramid with ggplot? R

  2. 2

    How tick labels on one of the plot's axis can be multiplied in MATLAB?

  3. 3

    Find .offset of each element with X class

  4. 4

    How to shrink plot on x-axis in matplotlib?

  5. 5

    How to move Date under X axis?

  6. 6

    Two different x axis labels on line chart, chart.js react

  7. 7

    Flutter how to have several cross axis alignment for each child in row

  8. 8

    How to remove text in an element but show its children

  9. 9

    How to skip first element in each line of matrix?

  10. 10

    Polymer: How to show a DOM element not decleared in the custom/core element definition?

  11. 11

    X,Y axis skew line how go up/down/sides

  12. 12

    Excel chart: How to reverse the X axis of time series data

  13. 13

    How to set maximum x-axis value for HorizontalBarChart?

  14. 14

    How to change CSS background-position for the X axis only?

  15. 15

    How to tell Excel to plot one column on x axis and another column on vertical axis?

  16. 16

    How to show window after pressing X

  17. 17

    Adjust labels of second Y axis on the right of the plot

  18. 18

    Place axis text labels between ticks

  19. 19

    Teechart Axis Item Modification of X axis Item

  20. 20

    How can i add id's and add labels to each checkbox dynamically

  21. 21

    How to force an input html element to show only the last inputted character

  22. 22

    How to show part of element from other side of canvas

  23. 23

    Highcharts. Is it possible to show data labels programmatically

  24. 24

    How do I get the textfields and the labels to sit in a 7x3 grid?

  25. 25

    How to return an element value from one branch based on an element value while in a for-each loop

  26. 26

    Labels on the same line, not under each other

  27. 27

    R universal distance between plot limits and axis labels/title

  28. 28

    Google Charts - How to stretch x axis over chart's full width

  29. 29

    How to spcify ticks on x axis for time scale in d3js?

뜨겁다태그

보관