defalut Axis label format
it seems to me the default label format in wt-3.3.2 to be an empty string (as it was in wt-3.3.1), but the labels are missing if the scale is date(time). For a numeric axis the rounding of the label number fails (see attached pictures).
void Wt::Chart::WAxis::setLabelFormat (const WString &format) The default value is "%.4g" for a numeric axis, and a suitable format for date(time) scales based on a heuristic taking into account the current axis range.
Updated by Стойчо Стефанов Stoycho Stefanov over 8 years ago
it could be a hint to you. I had similar problem with rounding when a double form a WStandardItem is rendered in an abstract view widget (e.g., WTreeView). I saw that the boost::lecixal_cast does not convert a double into a std::string correctly. I always get the a string like "3.300000000001" from a double 3.3.
My work around was to print the double into an std::stringstream and to assign the stream's string to the WStandartItem.
Updated by Koen Deforche over 8 years ago
- Status changed from InProgress to Feedback
There's a subtle difference between 3.3.1 and 3.3.2 here that may the culprit. In 3.3.1 the default format was an empty string, causing the format to be chosen based on heuristics.
In 3.3.2, the default format is no longer an empty string (and that's also no longer stated as such in he documentation), but the default format still keeps the same behavior. Setting an empty string as format will cause the axis's labels to be formatted by the user's locale. If you were thus calling setLabelFormat("") in 3.3.1 then you would see the behavior you are now seeing (I could reproduce it only by setting an empty string as label format).
The 3.3.2 situation is still not satisfying, which is why there is now a new issue (#2804) to research a definite solution for localization support in Wt.