Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to create a financial dashboard using Mathematica. I am having trouble formatting the axes ticks to show whole numbers. Further, when I hover over one of the chart elements, it is displayed in scientific notation. I have attached the code and an image.

Manipulate[
  sql = StringJoin[
    "select Right(Period,2) as [Period], SUM(Revenue) as [Revenue] ", 
    " from PRSummaryCMF where Month >=  ", ToString[a], 
    " and Year =  ", ToString[b], " group by Period order by Period"];
  n = SQLExecute[conn, sql];
  BarChart[n[[All, 2]], 
    ChartLabels -> {n[[All, 1]]}, 
    ChartStyle -> "Pastel" , 
    BarSpacing -> Automatic], 
  {{b, 2010, "Year"}, {2010, 2011, 2012, 2013}, ControlType -> Setter}, 
  {{a, "01", "Period"}, 
    {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"}, 
    ControlType -> Setter,  Appearance -> "Labeled"},
  ContentSize -> 500]

Output Image

share|improve this question
    
Take a look here reference.wolfram.com/mathematica/tutorial/… –  belisarius Oct 22 '13 at 18:15

1 Answer 1

My attempt:

n = Table[{x , x  RandomReal[] 10^6}, {x, 1, 12}];
BarChart[n[[All, 2]],
 LabelingFunction -> (AccountingForm[#] &),
 Frame -> True,
 FrameTicks -> {{Table[{x, AccountingForm[x], {.01, 0}}, {x, 10^5, 
      10^7, 10^6}], None}, {None, None}},
 ChartLabels -> Placed[n[[All, 1]], {{0.5, 0}, {0, 2}}] ,
 ChartStyle -> "Pastel",
 BarSpacing -> Automatic]

a bar chart

But I think it should be easier than this somehow…

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.